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

0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 2, 1, 2, 4, 1, 4, 4, 2, 4, 5, 3, 7, 5, 5, 6, 6, 5, 7, 9, 7, 7, 12, 6, 10, 10, 7, 12, 14, 8, 16, 12, 8, 16, 16, 10, 19, 13, 15, 19, 16, 15, 18, 20, 18, 20, 25, 15, 24, 24, 18, 25, 26, 17, 34, 26, 18, 31, 28, 22, 36, 27, 29, 34, 31

1

T. D. Noe, Plot of 1000 terms

T. D. Noe, Table of 1000 terms

S. Chowla, The representation of a number as four squares and a prime, Acta Arithmetica, Vol. 1, No. 1, pp. 115-122.

(Mma) nn = 10; s = Select[Sort[Flatten[Table[x^2 + y^2 + z^2 + u^2 + p, {x, nn}, {y, x, nn}, {z, y, nn}, {u, z, 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. S000126-S000136 (2 to 4 squares), A002471, A064272 (1 square).

nonn

T. D. Noe, Jul 09 2014