|
|
A239062
|
|
Number of integers x, 1 <= x <= n, such that x^x == 0 (mod n).
|
|
3
|
|
|
1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 7, 1, 3, 1, 2, 1, 1, 1, 4, 5, 1, 9, 2, 1, 1, 1, 15, 1, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 8, 7, 5, 1, 2, 1, 9, 1, 4, 1, 1, 1, 2, 1, 1, 3, 31, 1, 1, 1, 2, 1, 1, 1, 12, 1, 1, 5, 2, 1, 1, 1, 8, 26, 1, 1, 2, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 16, 1, 7, 3, 10, 1, 1, 1, 4, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
EXAMPLE
|
Table of records a(n) and first positions n:
i n a(n)
-------------------
1 1 1
2 4 2
3 8 3
4 16 7
5 27 9
6 32 15
7 64 31
8 128 62
9 243 80
10 256 126
11 512 253
12 1024 509
13 2048 1020
14 4096 2044
15 6561 2185
16 8192 4092
17 16384 8188
(End)
|
|
MATHEMATICA
|
gg0[n_] := Sum[If[Mod[x^x , n] == 0, 1, 0], {x, n}]; Array[gg0, 200]
(* or *)
Array[Sum[Boole[PowerMod[x, x, #] == 0], {x, #}] &, 10^4] (* or *)
Table[Count[Range@ n, k_ /; PowerMod[k, k, n] == 0], {n, 200}] (* Michael De Vlieger, Sep 23 2017 *)
|
|
PROG
|
(PARI) A239062(n) = sum(x=1, n, if(0 == Mod(x^x, n), 1, 0)); \\ Antti Karttunen, Sep 23 2017, after the Mathematica-program.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|