login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A226961
Numbers n such that 1^n + 2^n + 3^n + ... + n^n == 3 (mod n).
11
1, 2, 3, 18, 126, 5418
OFFSET
1,2
COMMENTS
Equivalently, numbers n such that B(n)*n == 3 (mod n), where B(n) is the n-th Bernoulli number. Equivalently, SUM[prime p, (p-1) divides n] n/p == -3 (mod n). - Max Alekseyev, Aug 25 2013
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, #}], #] == 3 &]
PROG
(PARI) is(n)=Mod(sumdiv(n, d, if(isprime(d+1), n/(d+1))), n)==-3 \\ Charles R Greathouse IV, Nov 13 2013
CROSSREFS
Cf. A031971.
Solutions to 1^n+2^n+...+n^n == m (mod n): A005408 (m=0), A014117 (m=1), A226960 (m=2), this sequence (m=3), A226962 (m=4), A226963 (m=5), A226964 (m=6), A226965 (m=7), A226966 (m=8), A226967 (m=9), A280041 (m=19), A280043 (m=43), A302343 (m=79), A302344 (m=193).
Sequence in context: A288492 A184719 A076016 * A374865 A107095 A102939
KEYWORD
nonn,fini,full
AUTHOR
EXTENSIONS
1, 2, 3 prepended by Max Alekseyev, Aug 25 2013
STATUS
approved