The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A226963 Numbers n such that 1^n + 2^n + 3^n + ... + n^n == 5 (mod n). 11

%I

%S 1,2,5,10,30,210,9030,235290,11072512110

%N Numbers n such that 1^n + 2^n + 3^n + ... + n^n == 5 (mod n).

%C 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

%C There are no other terms below 10^31. - _Max Alekseyev_, Apr 04 2018

%H 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:<a href="http://doi.org/10.1016/j.dam.2018.05.022">10.1016/j.dam.2018.05.022</a> arXiv:<a href="http://arxiv.org/abs/1602.02407">1602.02407</a> [math.NT]

%t Select[Range[10000], Mod[Sum[PowerMod[i, #, #], {i, #}], #] == 5 &]

%o (PARI) is(n)=Mod(sumdiv(n, d, if(isprime(d+1), n/(d+1))), n)==-5 \\ _Charles R Greathouse IV_, Nov 13 2013

%Y Cf. A031971.

%Y Solutions to 1^n+2^n+...+n^n == m (mod n): A005408 (m=0), A014117 (m=1), A226960 (m=2), A226961 (m=3), A226962 (m=4), this sequence (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).

%K nonn,more

%O 1,2

%A _José María Grau Ribas_, Jun 24 2013

%E Terms 1,2,5 prepended and a(9) added by _Max Alekseyev_, Aug 26 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 5 14:14 EDT 2021. Contains 346469 sequences. (Running on oeis4.)