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.

A317685 Number of partitions of n into a prime and two positive squares.

This page as a plain text file.
%I A317685 #18 May 21 2025 15:52:19
%S A317685 0,0,0,0,1,1,0,2,1,1,2,1,2,3,0,4,2,1,2,3,3,4,3,3,3,4,1,4,4,3,3,6,3,4,
%T A317685 4,2,6,6,1,8,3,3,6,6,4,6,4,5,7,6,3,6,6,5,6,9,5,8,6,3,7,8,2,12,6,4,7,7,
%U A317685 6,10,7,7,9,7,5,9,9,7,9,10,4
%N A317685 Number of partitions of n into a prime and two positive squares.
%C A317685 As in A025426, the two squares do not need to be distinct.
%H A317685 Robert Israel, <a href="/A317685/b317685.txt">Table of n, a(n) for n = 0..10000</a>
%F A317685 a(n) = Sum_{primes p} A025426(n-p).
%e A317685 a(7) = 2 counts 7 = 5 + 1^2 + 1^2 = 2 + 1^2 + 2^2.
%p A317685 A317685 := proc(n)
%p A317685     a := 0 ;
%p A317685     p := 2;
%p A317685     while p <= n do
%p A317685         a := a+A025426(n-p);
%p A317685         p := nextprime(p) ;
%p A317685     end do:
%p A317685     a ;
%p A317685 end proc:
%t A317685 p2sQ[{a_,b_,c_}]:=PrimeQ[a]&&AllTrue[{Sqrt[b],Sqrt[c]},IntegerQ]||PrimeQ[b] && AllTrue[{Sqrt[c],Sqrt[a]},IntegerQ]||PrimeQ[c]&&AllTrue[{Sqrt[b],Sqrt[a]},IntegerQ]; Table[Count[IntegerPartitions[n,{3}],_?(p2sQ[#]&)],{n,0,80}] (* _Harvey P. Dale_, Mar 10 2023 *)
%Y A317685 Cf. A025426, A317682 - A317684.
%K A317685 nonn,look,easy
%O A317685 0,8
%A A317685 _R. J. Mathar_, _Michel Marcus_, Aug 04 2018