OFFSET
3,1
COMMENTS
The number x is called a fixed point of the discrete logarithm with base g. The number of fixed points for each prime p is tabulated in A084793.
MATHEMATICA
Table[p=Prime[n]; coprimes=Select[Range[p-1], GCD[ #, p-1] == 1 &]; primRoots = PowerMod[PrimitiveRoot[p], coprimes, p]; g=Select[primRoots, MemberQ[PowerMod[ #, Range[p-1], p] - Range[p-1], 0] &, 1][[1]]; Position[PowerMod[g, Range[p-1], p] - Range[p-1], 0, 1, 1][[1, 1]], {n, 3, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 18 2010
EXTENSIONS
Name edited by M. F. Hasler, Apr 20 2024
STATUS
approved