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.

A095366 Least k > 1 such that k divides 1^n + 2^n +...+ (k-1)^n.

This page as a plain text file.
%I A095366 #8 Dec 19 2018 15:12:39
%S A095366 3,5,3,7,3,5,3,7,3,5,3,11,3,5,3,7,3,5,3,7,3,5,3,11,3,5,3,7,3,5,3,7,3,
%T A095366 5,3,11,3,5,3,7,3,5,3,7,3,5,3,11,3,5,3,7,3,5,3,7,3,5,3,17,3,5,3,7,3,5,
%U A095366 3,7,3,5,3,11,3,5,3,7,3,5,3,7,3,5,3,11,3,5,3,7,3,5,3,7,3,5,3,11,3,5,3,7
%N A095366 Least k > 1 such that k divides 1^n + 2^n +...+ (k-1)^n.
%C A095366 This sequence is similar to A094756 but seems to have a simpler periodicity rules:
%C A095366 a(n)=3 when n=1 (mod 2), otherwise
%C A095366 a(n)=5 when n=2 (mod 4), otherwise
%C A095366 a(n)=7 when n=4*m (mod 12) for some m=1,2, otherwise
%C A095366 a(n)=11 when n=12*m (mod 60) for some m=1,2,3,4, otherwise
%C A095366 a(n)=17 when n=60*m (mod 240) for some m=1,2,3, otherwise
%C A095366 a(n)=19 when n=240*m (mod 720) for some m=1,2, otherwise
%C A095366 a(n)=23 when n=720*m (mod 7920) for some m=1,..,10, etc.
%C A095366 Note that only odd primes p given by A095365 seem to appear in this sequence. Given the definition of f(p) in that sequence, let q=A095365(i) and p=A095365(i-1), then the general rule for this sequence seems to be a(n)=q when n=f(p)*m (mod f(q)) for some m=1,...,f(q)/f(p)-1
%H A095366 Antti Karttunen, <a href="/A095366/b095366.txt">Table of n, a(n) for n = 1..20000</a>
%H A095366 Antti Karttunen, <a href="/A095366/a095366.txt">Data supplement: n, a(n) computed for n = 1..100000</a>
%e A095366 a(4) = 7 because k divides 1^4 + 2^4 +...+ k^4 for k=7 but no smaller k > 1.
%t A095366 Table[k=2; s=0; While[s=s+(k-1)^n; Mod[s, k]>0, k++ ]; k, {n, 100}]
%o A095366 (PARI) A095366(n) = { my(k=1,s=0); while(1, k++; s += ((k-1)^n); if(!(s%k), return(k))); }; \\ _Antti Karttunen_, Dec 19 2018
%Y A095366 Cf. A094756, A095365.
%K A095366 nonn
%O A095366 1,1
%A A095366 _T. D. Noe_, Jun 03 2004