A382992
Number of compositions of n that have at least 1 part equal to 1 and any part 1 at position k can be k different colors.
Original entry on oeis.org
0, 1, 2, 9, 38, 190, 1105, 7465, 57808, 505924, 4940320, 53248819, 627848796, 8037734786, 111017325240, 1645384681388, 26044845197271, 438499277778649, 7824114643729925, 147476551001252541, 2928074880767250057, 61078483577649281698, 1335438738400978500931
Offset: 0
a(3) = 9 counts: (2, 1_a), (2, 1_b), (1_a, 2), (1_a, 1_a, 1_a), (1_a, 1_a, 1_b), (1_a, 1_a, 1_c), (1_a, 1_b, 1_a), (1_a, 1_b, 1_b), (1_a, 1_b, 1_c).
-
b:= proc(n, i, t) option remember; `if`(n=0, t, add(
b(n-j, i+1, `if`(j=1, 1, t))*`if`(j=1, i, 1), j=1..n))
end:
a:= n-> b(n, 1, 0):
seq(a(n), n=0..22); # Alois P. Heinz, Apr 23 2025
-
A_x(N) = {my(x='x+O('x^N)); Vec(-x^2/(1-x-x^2) + sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
A_x(30)
A383101
Number of compositions of n such that any part 1 can be m different colors where m is the largest part of the composition.
Original entry on oeis.org
1, 1, 2, 6, 21, 77, 294, 1178, 4978, 22191, 104146, 513385, 2653003, 14349804, 81125023, 478686413, 2943737942, 18838530436, 125268429098, 864256288435, 6177766228172, 45689641883377, 349173454108407, 2754058599745239, 22393206702946457, 187501022603071090
Offset: 0
a(3) = 6 counts: (3), (2,1_a), (2,1_b), (1_a,2), (1_b,2), (1_a,1_a,1_a).
-
b:= proc(n, p, m) option remember; binomial(n+p, n)*
m^n+add(b(n-j, p+1, max(m, j)), j=2..n)
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Apr 23 2025
-
A_x(N) = {my(x='x+O('x^N)); Vec(1+sum(m=1,N, x^m/((1-m*x-(x^2-x^m)/(1-x))*(1-m*x-(x^2-x^(m+1))/(1-x)))))}
A_x(30)
A383275
Number of compositions of n such that any part 1 can be k different colors where k is the current record having appeared in the composition.
Original entry on oeis.org
1, 1, 2, 5, 14, 42, 134, 454, 1634, 6245, 25321, 108779, 494443, 2374288, 12024257, 64100444, 358948674, 2106756217, 12931155910, 82823317389, 552400947902, 3829070637080, 27534807426150, 205066734143893, 1579309451332366, 12559941159979791, 103013928588389695
Offset: 0
a(3) = 5: (3), (1_a,2), (2,1_a), (2,1_b), (1_a,1_a,1_a).
-
b:= proc(n, m) option remember; `if`(n=0, 1, add(
b(n-j, max(j, m))*`if`(j=1, m, 1), j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..26); # Alois P. Heinz, Apr 23 2025
-
A_x(N) = {my(x='x+O('x^N)); Vec(prod(i=1,N,1+x^i/(1-i*x+(-x^2+x^(i+1))/(1-x))))}
A_x(30)
Showing 1-3 of 3 results.
Comments