Qurak

Powers of a primitive root

Example 2 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
n = 2 Prime[5];
p = PrimitiveRoot[n];
{n, p}
Output
{22, 13}
Step 2
Graph[Table[PowerMod[p, k, n] -> PowerMod[p, k + 1, n], {k, EulerPhi[n]}], DirectedEdges -> True, VertexLabels -> Placed["Name", Center], VertexSize -> 0.4, VertexStyle -> LightOrange]
Output
Graph[<10>, <10>]

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client