login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of partitions of n into a prime and two squares.
2

%I #11 Aug 04 2018 11:15:29

%S 0,0,1,2,2,2,2,4,2,2,2,4,4,4,2,5,3,3,4,5,5,6,4,6,4,4,2,7,6,5,5,7,6,6,

%T 4,4,7,7,5,10,4,6,8,8,6,8,5,9,9,7,4,8,8,8,9,10,8,10,6,6,9,9,6,14,6,6,

%U 10,10,10,12,8,10,12,9,6,12,10,11,11,12,7

%N Number of partitions of n into a prime and two squares.

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

%H C. Hooley, <a href="https://projecteuclid.org/euclid.acta/1485892233">On the representation of a number as the sum of two squares and a prime</a>, Acta Mathem. 97 (1957) 189-210

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

%e 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.

%p A317684 := proc(n)

%p a := 0 ;

%p p := 2;

%p while p <= n do

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

%p p := nextprime(p) ;

%p end do:

%p a ;

%p end proc:

%Y Cf. A000161, A317682-A317685.

%K nonn,easy

%O 0,4

%A _R. J. Mathar_, _Michel Marcus_, Aug 04 2018