login
A341122
Number of partitions of n into 4 prime powers (including 1).
10
1, 1, 2, 3, 5, 5, 8, 9, 12, 13, 17, 17, 22, 22, 26, 27, 33, 31, 39, 38, 44, 43, 51, 47, 58, 54, 63, 60, 71, 64, 79, 74, 88, 82, 99, 88, 108, 97, 116, 105, 126, 110, 134, 119, 141, 126, 153, 133, 164, 143, 172, 149, 184, 155, 194, 168, 204, 173, 215, 180, 227, 192, 238
OFFSET
4,3
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), t-1), 0)))
end:
a:= n-> b(n$2, 4):
seq(a(n), n=4..66); # Alois P. Heinz, Feb 05 2021
MATHEMATICA
q[n_] := q[n] = Length[FactorInteger[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], t - 1], 0]]];
a[n_] := b[n, n, 4];
Table[a[n], {n, 4, 66}] (* Jean-François Alcover, Feb 22 2022, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 05 2021
STATUS
approved