login
Least positive x such that g^x = x (mod p) for g=A174329(n), where p=prime(n).
2

%I #6 Apr 21 2024 14:03:07

%S 3,2,7,10,5,4,2,6,28,16,4,10,8,36,28,43,45,2,53,16,35,18,45,24,50,36,

%T 106,62,97,23,2,75,41,72,139,149,112,27,100,51,180,117,26,159,52,66,

%U 190,195,196,180,30,143,97,209,141,65,66,251,219,254,160,151,36,29,232,223

%N Least positive x such that g^x = x (mod p) for g=A174329(n), where p=prime(n).

%C 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.

%t 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}]

%K nonn

%O 3,1

%A _T. D. Noe_, Mar 18 2010

%E Name edited by _M. F. Hasler_, Apr 20 2024