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.

A163251 Primes that are sum of (at least two) consecutive squares.

Original entry on oeis.org

5, 13, 29, 41, 61, 113, 139, 149, 181, 199, 271, 313, 421, 509, 613, 677, 761, 811, 1013, 1201, 1279, 1301, 1459, 1741, 1861, 1877, 2113, 2381, 2521, 2539, 2791, 3121, 3331, 3613, 3677, 3919, 4231, 4513, 5101, 7159, 7321, 8011, 8429, 8581, 9661, 9749, 9859
Offset: 1

Views

Author

Gaurav Kumar, Jul 23 2009

Keywords

Comments

Let S(n,k) = (n+1)^2 + (n+2)^2 +... + (n+k)^2, n>=0, k>=2. S(n,k) is always composite for k=4 (2 | S), k=5 (5 | S), and k >= 7 (see A256503). So a(n) is the sum of 2, 3, or 6 consecutive squares. The smallest a(n) that cannot be written as a sum of fewer than 6 consecutive squares is a(7)=139. - Vladimir Shevelev, Apr 08 2015

Examples

			5 = 1^2 + 2^2.
13 = 2^2 + 3^2.
29 = 2^2 + 3^2 + 4^2.
		

Crossrefs

A027862 is a subsequence.
Subsequence of A174069.

Programs

  • Mathematica
    lst = {}; Do[p = m^2; Do[p += n^2; If[PrimeQ[p] && p <= 101701, AppendTo[lst, p]], {n, m + 1, 6!, 1}], {m, 6!}]; Take[Union@lst, 5!] (* Vladimir Joseph Stephan Orlovsky, Sep 15 2009 *)
    Select[Union[Flatten[Table[Total/@Partition[Range[100]^2,n,1],{n,2,10}]]],PrimeQ] (* Harvey P. Dale, Mar 12 2015 *)

Extensions

Offset corrected by Donovan Johnson, Nov 05 2012