login
A188776
Numbers n such that Sum_{k=1..n} k^k == 1 (mod n).
4
1, 2, 9, 30, 6871, 185779, 208541, 813162, 864355, 2573155
OFFSET
1,2
COMMENTS
Numbers n such that A001923(n) == 1 (mod n).
a(11) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015
MATHEMATICA
Union@Table[If[Mod[Sum[PowerMod[i, i, n], {i, 1, n}], n]==1, Print[n]; n], {n, 1, 20000}]
PROG
(PARI)
f(n)=lift(sum(k=1, n, Mod(k, n)^k));
for(n=1, 10^6, if(f(n)==1, print1(n, ", "))) /* Joerg Arndt, Apr 10 2011 */
(Python)
from itertools import accumulate, count, islice
def A188776_gen(): # generator of terms
yield 1
for i, j in enumerate(accumulate(k**k for k in count(2)), start=2):
if not j % i:
yield i
A188776_list = list(islice(A188776_gen(), 5)) # Chai Wah Wu, Jun 18 2022
CROSSREFS
Cf. A001923, A128981 (sum == 0 mod n), A188775 (sum == -1 mod n).
Sequence in context: A347893 A151823 A084652 * A261443 A211924 A295134
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(6)-a(9) from Lars Blomberg, May 10 2011
a(1) inserted and a(10) added by Hiroaki Yamanouchi, Aug 25 2015
STATUS
approved