login
The number of times x^x == x (mod prime(n)) for x in 0 < x < prime(n).
4

%I #6 Feb 19 2014 17:51:17

%S 1,1,1,2,1,2,3,2,2,2,3,2,5,3,2,1,1,4,3,2,5,4,1,4,5,3,4,1,2,5,5,3,5,4,

%T 2,5,7,3,2,2,1,5,3,9,3,7,6,2,1,2,6,3,8,5,5,2,1,8,3,10,2,1,8,6,9,1,9,

%U 12,1,5,5,2,4,6,6,2,1,4,5,9,4,4,3,6,4,5,6

%N The number of times x^x == x (mod prime(n)) for x in 0 < x < prime(n).

%C This is A065295 restricted to the primes. The plot is significantly different.

%H T. D. Noe, <a href="/A233519/b233519.txt">Table of n, a(n) for n = 1..10000</a>

%H Pär Kurlberg, Florian Luca, and Igor Shparlinski <a href="http://arxiv.org/abs/1402.4464">On the fixed points of the map x -> x^x modulo a prime</a> arX1v 1402.4464

%t f[p_] := Module[{x = Range[p - 1]}, Count[PowerMod[x, x, p] - x, 0]]; Table[f[n], {n, Prime[Range[100]]}]

%Y Cf. A065295, A233518, A233520.

%K nonn

%O 1,4

%A _T. D. Noe_, Feb 19 2014