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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226960 Numbers n such that 1^n + 2^n + 3^n +...+ n^n == 2 (mod n). 12
1, 4, 12, 84, 3612 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also, numbers n such that B(n)*n == 2 (mod n), where B(n) is the n-th Bernoulli number. Equivalently, SUM[prime p, (p-1) divides n] n/p == -2 (mod n). - Max Alekseyev, Aug 25 2013

LINKS

Table of n, a(n) for n=1..5.

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, #}], #] == 2 &]

PROG

(PARI) is(n)=if(n%2, return(n==1)); Mod(sumdiv(n/2, d, if(isprime(2*d+1), n/(2*d+1)))+n/2, n)==-2 \\ Charles R Greathouse IV, Nov 13 2013

CROSSREFS

Cf. A031971, A014117.

Subsequence of A124240.

Solutions to 1^n+2^n+...+n^n == m (mod n): A005408 (m=0), A014117 (m=1), this sequence (m=2), A226961 (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: A205337 A263866 A208802 * A081214 A331087 A194004

Adjacent sequences:  A226957 A226958 A226959 * A226961 A226962 A226963

KEYWORD

nonn,fini,full

AUTHOR

José María Grau Ribas, Jun 24 2013

EXTENSIONS

a(1)=1 prepended by Max Alekseyev, Aug 25 2013

STATUS

approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 01:41 EDT 2021. Contains 346269 sequences. (Running on oeis4.)