OFFSET
1,3
COMMENTS
Total number of prime power parts (1 excluded) in all compositions (ordered partitions) of n.
LINKS
FORMULA
G.f.: Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.
EXAMPLE
a(5) = 20 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 3], [2, 2, 1], [2, 1, 2], [2, 1, 1, 1], [1, 4], [1, 3, 1], [1, 2, 2], [1, 2, 1, 1], [1, 1, 3], [1, 1, 2, 1], [1, 1, 1, 2], [1, 1, 1, 1, 1] and 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 0 = 20.
MAPLE
b:= proc(n) option remember; nops(ifactors(n)[2])=1 end:
a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+
`if`(b(j), ceil(2^(n-j-1)), 0), j=1..n))
end:
seq(a(n), n=1..33); # Alois P. Heinz, Aug 07 2019
MATHEMATICA
nmax = 33; Rest[CoefficientList[Series[Sum[Floor[1/PrimeNu[k]] x^k (1 - x)^2/(1 - 2 x)^2, {k, 2, nmax}], {x, 0, nmax}], x]]
PROG
(PARI) x='x+O('x^34); concat([0], Vec(sum(k=2, 34, (1\omega(k))*x^k*(1 - x)^2/(1 - 2*x)^2))) \\ Indranil Ghosh, Apr 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 06 2017
STATUS
approved