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.

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.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Mar 31 2015

Keywords

Comments

Every term is either 0 or 1 or 2 or 5.
a(n)=0 if and only if n is in A256385.

Crossrefs

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.

Extensions

More terms from Peter J. C. Moses, Mar 31 2015