S000130


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

0, 1, 2, 2, 3, 3, 4, 4, 3, 3, 6, 5, 6, 6, 6, 7, 6, 5, 9, 9, 9, 9, 10, 9, 9, 7, 10, 11, 13, 10, 13, 14, 10, 11, 12, 13, 15, 14, 14, 17, 15, 12, 19, 15, 16, 18, 18, 19, 18, 15, 17, 20, 21, 18, 23, 24, 21, 20, 21, 19, 25, 21, 22, 28, 21, 19, 28, 25, 25, 29, 26, 29

1

S000130

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, 0, 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