S000129


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

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

1

S000129

T. D. Noe, Plot of 1000 terms

T. D. Noe, Table of 1000 terms

(Mma) nn = 10; s = Select[Sort[Flatten[Table[x^2 + y^2 + z^2 + p, {x, nn}, {y, x, nn}, {z, 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