S000135


Number of ways that n can be written as the sum of two positive squares and a prime.

0, 0, 0, 1, 1, 0, 3, 2, 1, 3, 1, 4, 4, 0, 6, 4, 2, 4, 4, 5, 5, 6, 5, 6, 5, 2, 7, 8, 5, 6, 9, 6, 7, 7, 2, 12, 9, 2, 13, 6, 5, 12, 10, 8, 9, 8, 9, 14, 8, 6, 10, 11, 9, 12, 13, 10, 15, 12, 5, 14, 11, 4, 21, 12, 7, 14, 12, 12, 16, 14, 13, 18, 11, 9, 14, 18, 12, 18

1

S000135

T. D. Noe, Plot of 10000 terms

T. D. Noe, Table of 10000 terms

(Mma) nn = 10; s = Select[Sort[Flatten[Table[x^2 + y^2 + p, {x, nn}, {y, nn}, {p, Prime[Range[PrimePi[nn^2]]]}]]], # <= nn^2 &]; t = Table[0, {nn^2}]; s = Tally[s]; Do[t[[i[[1]]]] = i[[2]], {i, s}]; t

Cf. S000125-S000136 (2 to 4 squares), A002471A064272 (1 square).

nonn

T. D. Noe, Jul 11 2014

© Tony D Noe 2014-2015