# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a286510 Showing 1-1 of 1 %I A286510 #15 Oct 12 2020 11:14:27 %S A286510 1,1,1,1,2,1,1,3,4,2,1,6,5,2,9,11,12,5,7,9,8,8,17,12,11,16,12,23,20, %T A286510 16,17,17,23,17,26,18,19,25,26,32,38,21,21,18,27,25,24,27,52,30,44,33, %U A286510 19,44,54,45,57,14,29,27,39,58,28,41,39,62,26,25,69,48,51,61,44,47,37,63,77,55,55,41 %N A286510 Number of primitive roots g mod prime(n) for which there is no solution to g^x == x (mod p) with 2 <= x <= prime(n)-2. %H A286510 Robert Israel, Table of n, a(n) for n = 1..1000 %H A286510 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). %H A286510 Math Overflow, Fixed points of g^x (modulo a prime) %F A286510 a(n) = A008330(n) - A174407(n) for n >= 2. %p A286510 f:= proc(n) local p, r, S, R,x; %p A286510 p:= ithprime(n); %p A286510 r:= numtheory:-primroot(p); %p A286510 S:= select(t -> igcd(t,p-1) = 1, {$1..p-1}); %p A286510 R:= map(s -> r &^ s mod p, S); %p A286510 for x from 2 to p-2 do %p A286510 R:= remove(t -> (t &^ x - x mod p = 0), R); %p A286510 od; %p A286510 nops(R); %p A286510 end proc; %p A286510 map(f, [$1..100]); %t A286510 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 *) %Y A286510 Cf. A008330, A174407. %K A286510 nonn %O A286510 1,5 %A A286510 _Robert Israel_, May 10 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE