OFFSET
1,2
COMMENTS
Also, numbers n such that B(n)*n == 5 (mod n), where B(n) is the n-th Bernoulli number. Equivalently, SUM[prime p, (p-1) divides n] n/p == -5 (mod n). - Max Alekseyev, Aug 26 2013
There are no other terms below 10^31. - Max Alekseyev, Apr 04 2018
LINKS
M. A. Alekseyev, J. M. Grau, A. M. Oller-Marcen. Computing solutions to the congruence 1^n + 2^n + ... + n^n == p (mod n). Discrete Applied Mathematics, 2018. doi:10.1016/j.dam.2018.05.022 arXiv:1602.02407 [math.NT]
MATHEMATICA
Select[Range[10000], Mod[Sum[PowerMod[i, #, #], {i, #}], #] == 5 &]
PROG
(PARI) is(n)=Mod(sumdiv(n, d, if(isprime(d+1), n/(d+1))), n)==-5 \\ Charles R Greathouse IV, Nov 13 2013
CROSSREFS
KEYWORD
nonn,more
AUTHOR
José María Grau Ribas, Jun 24 2013
EXTENSIONS
Terms 1,2,5 prepended and a(9) added by Max Alekseyev, Aug 26 2013
STATUS
approved