A171634
Number of compositions of n such that the number of parts is divisible by the greatest part.
Original entry on oeis.org
1, 1, 3, 2, 8, 13, 21, 38, 89, 173, 302, 545, 1109, 2309, 4564, 8601, 16188, 31365, 62518, 125813, 251119, 493123, 956437, 1854281, 3633938, 7218166, 14444539, 28868203, 57300450, 112921744, 221760513, 436117749, 861764899, 1711773936
Offset: 1
-
b:= proc(n,t,g) option remember; `if`(n=0, `if`(irem(t, g)=0, 1, 0), add(b(n-i, t+1, max(i, g)), i=1..n)) end: a:= n-> b(n,0,0): seq(a(n), n=1..40); # Alois P. Heinz, Dec 15 2009
-
b[n_, t_, g_] := b[n, t, g] = If[n == 0, If [Mod[t, g] == 0, 1, 0], Sum[b[n - i, t + 1, Max[i, g]], {i, 1, n}]];
a[n_] := b[n, 0, 0];
Array[a, 40] (* Jean-François Alcover, Nov 11 2020, after Alois P. Heinz *)
A199885
Number of compositions of n such that the greatest part is not divisible by the number of parts.
Original entry on oeis.org
0, 1, 1, 6, 10, 23, 49, 106, 215, 444, 906, 1849, 3759, 7621, 15402, 31091, 62676, 126206, 253860, 510204, 1024665, 2056608, 4125625, 8272436, 16580967, 33223336, 66550937, 133278720, 266857006, 534220745, 1069297319, 2140037990, 4282507048, 8569103770
Offset: 1
a(4) = 6: [1,1,1,1], [1,1,2], [1,2,1], [1,3], [2,1,1], [3,1].
-
b:= proc(n, t, g) option remember; `if`(n=0, `if`(irem(g, t)=0, 0, 1), add(b(n-i, t+1, max(i, g)), i=1..n)) end: a:= n-> b(n, 0, 0): seq(a(n), n=1..40);
-
b[n_, t_, g_] := b[n, t, g] = If[n == 0, If[Mod[g, t] == 0, 0, 1], Sum [b[n-i, t+1, Max[i, g]], {i, 1, n}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 05 2014, after Alois P. Heinz *)
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)
Showing 1-3 of 3 results.