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”).

A218213
Number of n-digit primes representable as sums of consecutive squares.
2
1, 4, 13, 30, 69, 187, 519, 1401, 3889, 10861, 31640, 90735
OFFSET
1,2
COMMENTS
There are no common representations of two, three or six squares for n < 13, so
a(n) = A218207(n) + A218209(n) + A218211(n); n < 13.
FORMULA
a(n) = A218214(n) - A218213(n-1).
MATHEMATICA
nn = 8; nMax = 10^nn; t = Table[0, {nn}]; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, If[PrimeQ[s], t[[Ceiling[Log[10, s]]]]++]; k++], {n, Sqrt[nMax]}]; t (* T. D. Noe, Oct 23 2012 *)
KEYWORD
nonn,base
AUTHOR
Martin Renner, Oct 23 2012
STATUS
approved