login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A341145
Number of partitions of n into 8 distinct prime powers (including 1).
8
1, 0, 1, 1, 2, 1, 2, 3, 5, 5, 6, 7, 10, 10, 13, 16, 19, 21, 26, 30, 34, 37, 44, 52, 58, 66, 73, 85, 94, 106, 115, 136, 146, 165, 178, 204, 215, 248, 263, 298, 318, 356, 372, 426, 443, 494, 520, 585, 603, 681, 702, 781, 815, 906, 929, 1044, 1071, 1178, 1223
OFFSET
39,5
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, 8):
seq(a(n), n=39..97); # 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 - 1], t - 1], 0]]];
a[n_] := b[n, n, 8];
Table[a[n], {n, 39, 97}] (* Jean-François Alcover, Feb 22 2022, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 05 2021
STATUS
approved