A218208
Number of primes up to 10^n that are of the form (k-1)^2 + k^2.
Original entry on oeis.org
1, 4, 10, 26, 68, 175, 461, 1225, 3349, 9266, 26516, 76334, 221763
Offset: 1
-
n = 0; cnt = 0; Table[While[n++; p = 2*n^2 - 2*n + 1; p < 10^e, If[PrimeQ[p], cnt++]]; n--; cnt, {e, 10}] (* T. D. Noe, Oct 23 2012 *)
A218210
Number of primes up to 10^n that are of the form (k-2)^2 + (k-1)^2 + k^2.
Original entry on oeis.org
2, 3, 6, 10, 22, 53, 139, 369, 1050, 2984, 8618, 24390
Offset: 1
-
n = -1; cnt = 0; Do[While[n++; p = 3*n^2 + 2; p < 10^e, If[PrimeQ[p], cnt++]]; n--; cnt, {e, 10}] (* T. D. Noe, Oct 23 2012 *)
A218211
Number of n-digit primes that are the sum of six consecutive squares of nonnegative numbers.
Original entry on oeis.org
0, 0, 4, 10, 15, 49, 147, 407, 1084, 3010, 8756, 25145, 73424, 215375, 631828, 1870092, 5562131, 16584139, 49630873, 148917071, 448088250
Offset: 1
-
n = 0; Table[cnt = 0; While[n++; p = 91 + 42*n + 6*n^2; p < 10^e, If[PrimeQ[p], cnt++]]; n--; cnt, {e, 14}] (* T. D. Noe, Oct 23 2012 *)
A218214
Number of primes up to 10^n representable as sums of consecutive squares.
Original entry on oeis.org
1, 5, 18, 48, 117, 304, 823, 2224, 6113, 16974, 48614, 139349
Offset: 1
a(1) = 1 because only one prime less than 10 can be represented as a sum of consecutive squares, namely 5 = 1^2 + 2^2.
a(2) = 5 because there are five primes less than 100 representable as a sum of consecutive squares: the aforementioned 5, as well as 13 = 2^2 + 3^2, 29 = 2^2 + 3^2 + 4^2, 41 = 4^2 + 5^2 and 61 = 5^2 + 6^2.
Cf.
A027861,
A027862,
A027863,
A027864,
A027866,
A027867,
A163251,
A174069,
A218208,
A218210,
A218212,
A218213.
-
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]}]; Accumulate[t] (* T. D. Noe, Oct 23 2012 *)
Showing 1-4 of 4 results.
Comments