S000132


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

0, 1, 4, 6, 5, 7, 13, 13, 9, 10, 16, 21, 19, 14, 22, 28, 20, 21, 29, 31, 33, 34, 35, 39, 31, 25, 42, 51, 42, 37, 53, 56, 48, 44, 37, 60, 64, 49, 60, 68, 53, 60, 80, 62, 69, 71, 73, 93, 73, 54, 73, 96, 81, 81, 95, 95, 102, 97, 78, 90, 104, 79, 108, 125, 83, 96, 125

1

S000132

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