OFFSET
0,4
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 1 + Sum_{p>0} Sum_{k=1..p} x^(p*i) * Product_{j=1..i-1} (x^(-j*k) + x^(j*k)), where i = ceiling(p/k).
EXAMPLE
The compositions for n = 6 and n = 8 are:
6: [6], [5,1], [4,2], [3,2,1].
8: [8], [7,1], [6,2], [3,2,3], [3,5].
PROG
(PARI)
{ my(N=75, x='x+O('x^N));
my(gf= 1 + sum(p=1, N, sum(k=1, p, x^(p*ceil(p/k)) * prod(j=1, ceil(p/k)-1, (x^(-j*k) + x^(j*k))))));
Vec(gf) }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Mar 06 2024
STATUS
approved