A239061 Number of integers x, 1 <= x <= n, such that x^x == 1 (mod n).
1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 5, 2, 4, 1, 4, 1, 4, 1, 3, 3, 2, 1, 2, 3, 2, 2, 4, 1, 3, 1, 5, 1, 6, 1, 3, 2, 4, 1, 5, 1, 6, 3, 5, 1, 2, 1, 4, 1, 6, 2, 3, 1, 5, 2, 3, 3, 3, 1, 5, 3, 3, 1, 9, 2, 5, 1, 5, 2, 4, 1, 5, 3, 5, 3, 10, 1, 5, 1, 2, 1, 3, 1, 10, 3
Offset: 1
Keywords
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
gg1[n_] := Sum[If[PowerMod[x, x, n] == Mod[1, n], 1, 0], {x, n}];Array[gg1,200]