login
A341141
Number of partitions of n into 4 distinct prime powers (including 1).
9
1, 1, 1, 2, 3, 4, 5, 7, 7, 9, 9, 11, 12, 15, 15, 19, 18, 21, 21, 26, 25, 30, 29, 35, 32, 39, 37, 45, 43, 52, 50, 58, 54, 62, 61, 71, 66, 75, 74, 81, 78, 89, 85, 96, 93, 102, 99, 110, 103, 115, 117, 122, 120, 131, 127, 136, 136, 139, 142, 153, 147, 154, 160, 163, 165, 177, 175
OFFSET
10,4
MAPLE
q:= proc(n) option remember; nops(ifactors(n)[2])<2 end:
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
`if`(q(i), b(n-i, min(n-i, i-1), t-1), 0)))
end:
a:= n-> b(n$2, 4):
seq(a(n), n=10..76); # Alois P. Heinz, Feb 05 2021
MATHEMATICA
q[n_] := q[n] = PrimeNu[n] < 2;
b[n_, i_, t_] := b[n, i, t] = If[n == 0,
If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
If[q[i], b[n - i, Min[n - i, i - 1], t - 1], 0]]];
a[n_] := b[n, n, 4];
Table[a[n], {n, 10, 76}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 05 2021
STATUS
approved