cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A317684 #17 May 21 2025 15:53:05
%S A317684 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 A317684 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 A317684 10,10,10,12,8,10,12,9,6,12,10,11,11,12,7
%N A317684 Number of partitions of n into a prime and two squares.
%C A317684 As in A000161, the squares may be zero and do not need to be distinct.
%H A317684 Robert Israel, <a href="/A317684/b317684.txt">Table of n, a(n) for n = 0..10000</a>
%H A317684 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 A317684 a(n) = Sum_{primes p} A000161(n-p).
%e A317684 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 A317684 := proc(n)
%p A317684     a := 0 ;
%p A317684     p := 2;
%p A317684     while p <= n do
%p A317684         a := a+A000161(n-p);
%p A317684         p := nextprime(p) ;
%p A317684     end do:
%p A317684     a ;
%p A317684 end proc:
%Y A317684 Cf. A000161, A317682-A317685.
%K A317684 nonn,look,easy
%O A317684 0,4
%A A317684 _R. J. Mathar_, _Michel Marcus_, Aug 04 2018