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!)
A163251 Primes that are sum of (at least two) consecutive squares. 5
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
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
KEYWORD
nonn
AUTHOR
Gaurav Kumar, Jul 23 2009
EXTENSIONS
Offset corrected by Donovan Johnson, Nov 05 2012
STATUS
approved

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 19 07:38 EDT 2024. Contains 371782 sequences. (Running on oeis4.)