login
A383175
Number of compositions of n such that any fixed point k can be k different colors.
2
1, 1, 2, 5, 10, 22, 48, 101, 213, 450, 945, 1961, 4064, 8385, 17242, 35332, 72141, 146924, 298552, 605377, 1225277, 2475912, 4995754, 10067848, 20267680, 40762951, 81916919, 164504411, 330155437, 662265817, 1327860471, 2661376529, 5332341881, 10680912173
OFFSET
0,3
LINKS
FORMULA
G.f.: 1 + Sum_{i>0} Product_{j=1..i} ( j*x^j - x^j + x/(1-x) ).
EXAMPLE
a(3) = 5 counts: (3), (2,1), (1_a,2_a), (1_a,2_b), (1_a,1,1).
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, add(
`if`(n<=i+j, ceil(2^(n-j-1)), b(n-j, i+1))*
`if`(i=j, j, 1), j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..33); # Alois P. Heinz, Apr 18 2025
PROG
(PARI)
A_x(N) = {my(x='x+O('x^N)); Vec(1+sum(i=1, N, prod(j=1, i, j*x^j-x^j+x/(1-x))))}
A_x(30)
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Apr 18 2025
STATUS
approved