0,4

As in A000161, the squares may be zero and do not need to be distinct.

Table of n, a(n) for n=0..80.

C. Hooley, On the representation of a number as the sum of two squares and a prime, Acta Mathem. 97 (1957) 189-210

a(n) = Sum_{primes p} A000161(n-p).

a(11) = 4 counts 11 = 11+0^2+0^2 = 7+0^2+2^2 = 2+0^2+3^2 = 3+2^2+2^2.

A317684 := proc(n)

a := 0 ;

p := 2;

while p <= n do

a := a+A000161(n-p);

p := nextprime(p) ;

end do:

a ;

end proc:

Cf. A000161, A317682-A317685.

Sequence in context: A304817 A242802 A277561 * A127973 A300654 A023157

Adjacent sequences: A317681 A317682 A317683 * A317685 A317686 A317687

nonn,easy

R. J. Mathar, Michel Marcus, Aug 04 2018

approved