A341135 Number of ways to write n as an ordered sum of 6 prime powers (including 1).
1, 6, 21, 56, 126, 246, 432, 702, 1077, 1576, 2232, 3072, 4118, 5382, 6891, 8638, 10653, 12948, 15563, 18486, 21783, 25398, 29394, 33708, 38422, 43452, 49008, 54888, 61308, 68076, 75434, 83034, 91473, 100248, 109947, 120018, 131191, 142458, 155049, 167622, 181629, 195660
Offset: 6
Keywords
Crossrefs
Programs
-
Maple
q:= proc(n) option remember; nops(ifactors(n)[2])<2 end: b:= proc(n, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add( `if`(q(j), b(n-j, t-1), 0), j=1..n))) end: a:= n-> b(n, 6): seq(a(n), n=6..47); # Alois P. Heinz, Feb 05 2021
-
Mathematica
nmax = 47; CoefficientList[Series[Sum[Boole[PrimePowerQ[k] || k == 1] x^k, {k, 1, nmax}]^6, {x, 0, nmax}], x] // Drop[#, 6] &