This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A239062 #23 Apr 05 2021 03:54:47 %S A239062 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, %T A239062 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, %U A239062 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 %N A239062 Number of integers x, 1 <= x <= n, such that x^x == 0 (mod n). %H A239062 Antti Karttunen, <a href="/A239062/b239062.txt">Table of n, a(n) for n = 1..10000</a> %e A239062 From _Michael De Vlieger_, Sep 23 2017: (Start) %e A239062 Table of records a(n) and first positions n: %e A239062 i n a(n) %e A239062 ------------------- %e A239062 1 1 1 %e A239062 2 4 2 %e A239062 3 8 3 %e A239062 4 16 7 %e A239062 5 27 9 %e A239062 6 32 15 %e A239062 7 64 31 %e A239062 8 128 62 %e A239062 9 243 80 %e A239062 10 256 126 %e A239062 11 512 253 %e A239062 12 1024 509 %e A239062 13 2048 1020 %e A239062 14 4096 2044 %e A239062 15 6561 2185 %e A239062 16 8192 4092 %e A239062 17 16384 8188 %e A239062 (End) %t A239062 gg0[n_] := Sum[If[Mod[x^x , n] == 0, 1, 0], {x, n}];Array[gg0,200] %t A239062 (* or *) %t A239062 Array[Sum[Boole[PowerMod[x, x, #] == 0], {x, #}] &, 10^4] (* or *) %t A239062 Table[Count[Range@ n, k_ /; PowerMod[k, k, n] == 0], {n, 200}] (* _Michael De Vlieger_, Sep 23 2017 *) %o A239062 (PARI) A239062(n) = sum(x=1,n, if(0 == Mod(x^x, n), 1, 0)); \\ _Antti Karttunen_, Sep 23 2017, after the Mathematica-program. %Y A239062 Cf. A239061, A239063, A005117 (indices of 1's). %K A239062 nonn %O A239062 1,4 %A A239062 _José María Grau Ribas_, Mar 09 2014 %E A239062 More terms from _Antti Karttunen_, Sep 23 2017