|
|
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
|
a := 0 ;
p := 2;
while p <= n do
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|