

A163251


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


4



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


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


LINKS

Donovan Johnson, Table of n, a(n) for n = 1..1000


EXAMPLE

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


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 *)


CROSSREFS

A027862 is a subsequence.
Subsequence of A174069.
Sequence in context: A185086 A277701 A159351 * A247177 A146286 A065374
Adjacent sequences: A163248 A163249 A163250 * A163252 A163253 A163254


KEYWORD

nonn


AUTHOR

Gaurav Kumar, Jul 23 2009


EXTENSIONS

Offset corrected by Donovan Johnson, Nov 05 2012


STATUS

approved



