S000134


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

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

1

S000134

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, 0, nn}, {y, x, 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