login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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, 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, 1, 1, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 5, 1, 0, 1, 1, 2, 1
OFFSET
1,3
COMMENTS
Every term is either 0 or 1 or 2 or 5.
a(n)=0 if and only if n is in A256385.
FORMULA
1) if 2n^2+2n+1 is prime, then a(n)=1;
2) if 2n^2+2n+1 is not prime, but 3n^2+6n+5 is prime, then a(n)=2;
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;
4) otherwise, a(n)=0.
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Mar 31 2015
EXTENSIONS
More terms from Peter J. C. Moses, Mar 31 2015
STATUS
approved