login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317685 Number of partitions of n into a prime and two positive squares. 4
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, 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, 6, 10, 7, 7, 9, 7, 5, 9, 9, 7, 9, 10, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
As in A025426, the two squares do not need to be distinct.
LINKS
FORMULA
a(n) = Sum_{primes p} A025426(n-p).
EXAMPLE
a(7) = 2 counts 7 = 5 + 1^2 + 1^2 = 2 + 1^2 + 2^2.
MAPLE
A317685 := proc(n)
a := 0 ;
p := 2;
while p <= n do
a := a+A025426(n-p);
p := nextprime(p) ;
end do:
a ;
end proc:
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A281530 A340260 A175190 * A257540 A333516 A228202
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 21:09 EDT 2024. Contains 373532 sequences. (Running on oeis4.)