OFFSET
1,5
COMMENTS
These are integer compositions whose set of parts covers an initial interval and contains k colors of each part k.
EXAMPLE
a(6) = 13 counts: (1,1,1,1,1,1) and the 12 permutations of parts 1, 1, 2_a, and 2_b.
PROG
(PARI)
colr(x, y)={my(r=y-x+1, v=[x..y], z = vector(r*(r+(1+(x-1)*2))/2), k=1); for(i=1, #v, for(j=1, v[i], z[k]=v[i]; k++)); return(z)}
C_x(s, N)={my(x='x+O('x^N), g=if(#s <1, 1, sum(i=1, #s, C_x(s[^i], N) * x^(s[i]) )/(1-sum(i=1, #s, x^(s[i]))))); return(g)}
B_x(N)={my(x='x+O('x^N), j=1, h=0, s=colr(1, j)); while(vecsum(s) <= N, h += C_x(s, N+1); j++; s=colr(1, j)); my(a = Vec(h)); vector(N, i, a[i])}
B_x(25)
CROSSREFS
KEYWORD
nonn
AUTHOR
John Tyler Rascoe, Jul 17 2024
STATUS
approved