cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226960 Numbers n such that 1^n + 2^n + 3^n +...+ n^n == 2 (mod n).

This page as a plain text file.
%I A226960 #35 Sep 06 2018 10:02:30
%S A226960 1,4,12,84,3612
%N A226960 Numbers n such that 1^n + 2^n + 3^n +...+ n^n == 2 (mod n).
%C A226960 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
%H A226960 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 A226960 Select[Range[10000], Mod[Sum[PowerMod[i, #, #], {i, #}], #] == 2 &]
%o A226960 (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
%Y A226960 Cf. A031971, A014117.
%Y A226960 Subsequence of A124240.
%Y A226960 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).
%K A226960 nonn,fini,full
%O A226960 1,2
%A A226960 _José María Grau Ribas_, Jun 24 2013
%E A226960 a(1)=1 prepended by _Max Alekseyev_, Aug 25 2013