login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256503 Smallest k>=1 such that n^2 + (n+1)^2 + ... + (n+k)^2 is prime or a(n)=0 if there is no such k. 4

%I #13 Apr 03 2015 17:49:09

%S 1,1,5,1,1,2,1,0,1,0,0,1,5,1,0,0,1,5,1,0,5,1,5,1,1,0,0,0,1,1,0,1,0,1,

%T 1,0,0,5,1,0,0,1,0,0,0,0,1,5,0,1,5,2,0,0,0,2,0,0,0,1,0,2,5,0,1,2,0,0,

%U 1,1,0,1,0,0,0,2,0,0,1,0,5,1,0,1,1,2,1

%N Smallest k>=1 such that n^2 + (n+1)^2 + ... + (n+k)^2 is prime or a(n)=0 if there is no such k.

%C Every term is either 0 or 1 or 2 or 5.

%C a(n)=0 if and only if n is in A256385.

%F 1) if 2n^2+2n+1 is prime, then a(n)=1;

%F 2) if 2n^2+2n+1 is not prime, but 3n^2+6n+5 is prime, then a(n)=2;

%F 3) if 2n^2+2n+1 and 3n^2+6n+5 are both composite numbers, but 6n^2+30n+55 is prime, then a(n)=5;

%F 4) otherwise, a(n)=0.

%Y Cf. A000290, A256385, A089306.

%K nonn

%O 1,3

%A _Vladimir Shevelev_, Mar 31 2015

%E More terms from _Peter J. C. Moses_, Mar 31 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:28 EDT 2024. Contains 371916 sequences. (Running on oeis4.)