OFFSET
0,7
COMMENTS
As in A025435, zero is a valid square here.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
FORMULA
a(n) = Sum_{primes p} A025435(n-p).
EXAMPLE
a(12)=4 counts 12 = 11 + 0^2 + 1^2 = 3 + 0^2 + 3^2 = 7 + 1^2 + 2^2 = 2 + 1^2 + 3^2.
MAPLE
MATHEMATICA
A025435[n_] := Length[ PowersRepresentations[n, 2, 2]] - Boole[ IntegerQ[ Sqrt[2n]]];
a[n_] := Module[{s = 0, p}, For[p = 2, p <= n-1, p = NextPrime[p], s += A025435[n-p]]; s];
a /@ Range[0, 100] (* Jean-François Alcover, Apr 07 2020 *)
PROG
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Michel Marcus, Aug 04 2018
STATUS
approved