OFFSET
1,5
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
M. Levin, C. Pomerance, K. Soundararajan, Fixed Points for Discrete Logarithms. In: Hanrot G., Morain F., Thomé E. (eds) Algorithmic Number Theory. ANTS 2010. Lecture Notes in Computer Science, vol 6197. Springer, Berlin, Heidelberg (2010).
Math Overflow, Fixed points of g^x (modulo a prime)
MAPLE
f:= proc(n) local p, r, S, R, x;
p:= ithprime(n);
r:= numtheory:-primroot(p);
S:= select(t -> igcd(t, p-1) = 1, {$1..p-1});
R:= map(s -> r &^ s mod p, S);
for x from 2 to p-2 do
R:= remove(t -> (t &^ x - x mod p = 0), R);
od;
nops(R);
end proc;
map(f, [$1..100]);
MATHEMATICA
Join[{1}, Table[p = Prime[n]; EulerPhi[EulerPhi[p]] - Length[Select[ PrimitiveRootList[p], MemberQ[PowerMod[#, Range[p-1], p] - Range[p-1], 0] &]], {n, 2, 100}]] (* Jean-François Alcover, Oct 11 2020, after T. D. Noe in A174407 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, May 10 2017
STATUS
approved