A373118
Number T(n,k) of compositions of n such that the set of parts is [k]; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.
Original entry on oeis.org
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 7, 0, 1, 11, 6, 0, 1, 20, 12, 0, 1, 32, 32, 0, 1, 54, 72, 0, 1, 87, 152, 24, 0, 1, 143, 311, 60, 0, 1, 231, 625, 180, 0, 1, 376, 1225, 450, 0, 1, 608, 2378, 1116, 0, 1, 986, 4566, 2544, 120, 0, 1, 1595, 8700, 5752, 360
Offset: 0
T(6,2) = 11: 1122, 1212, 1221, 2112, 2121, 2211, 11112, 11121, 11211, 12111, 21111.
T(7,3) = 12: 1123, 1132, 1213, 1231, 1312, 1321, 2113, 2131, 2311, 3112, 3121, 3211.
Triangle T(n,k) begins:
1;
0, 1;
0, 1;
0, 1, 2;
0, 1, 3;
0, 1, 7;
0, 1, 11, 6;
0, 1, 20, 12;
0, 1, 32, 32;
0, 1, 54, 72;
0, 1, 87, 152, 24;
0, 1, 143, 311, 60;
0, 1, 231, 625, 180;
0, 1, 376, 1225, 450;
0, 1, 608, 2378, 1116;
0, 1, 986, 4566, 2544, 120;
...
Cf.
A000124,
A000142,
A000217,
A000290,
A001710,
A003056,
A008289,
A332721,
A371417,
A373305,
A373306.
-
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
`if`(i<1 or n b(n, k, 0):
seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..18);
A373305
Sum over all complete compositions of n of the element set cardinality.
Original entry on oeis.org
0, 1, 1, 5, 7, 15, 41, 77, 161, 325, 727, 1460, 3058, 6228, 12815, 26447, 54099, 110800, 226247, 461531, 939678, 1914189, 3890279, 7905962, 16045367, 32550830, 65971827, 133645098, 270561031, 547468214, 1107208235, 2238242852, 4522679064, 9135128917
Offset: 0
a(1) = 1: 1.
a(2) = 1: 11.
a(3) = 5 = 2 + 2 + 1: 12, 21, 111.
a(4) = 7 = 2 + 2 + 2 + 1: 112, 121, 211, 1111.
a(5) = 15 = 7*2 + 1: 122, 212, 221, 1112, 1121, 1211, 2111, 11111.
-
g:= proc(n, i, t) `if`(n=0, `if`(i=0, t!, 0),
`if`(i<1 or n add(g(n, k, 0)*k, k=0..floor((sqrt(1+8*n)-1)/2)):
seq(a(n), n=0..33);
-
g[n_, i_, t_] := If[n == 0, If[i == 0, t!, 0], If[i < 1 || n < i*(i+1)/2, 0, b[n, i, t]]];
b[n_, i_, t_] := b[n, i, t] = Sum[g[n-i*j, i-1, t+j]/j!, {j, 1, n/i}];
a[n_] := Sum[g[n, k, 0]*k, {k, 0, Floor[(Sqrt[1 + 8*n] - 1)/2]}];
Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Jun 08 2024, after Alois P. Heinz *)
A379836
Number of pairs of adjacent equal parts in all complete compositions of n.
Original entry on oeis.org
0, 0, 1, 2, 5, 12, 23, 54, 118, 258, 550, 1178, 2540, 5394, 11473, 24174, 51021, 107210, 225099, 471322, 985202, 2055542, 4281847, 8906676, 18500425, 38379246, 79516158, 164561560, 340179441, 702506576, 1449311429, 2987297778, 6151964642, 12658841766, 26027603925
Offset: 0
The complete compositions of n = 4 are: (1,1,2), (1,2,1), (2,1,1), and (1,1,1,1); having a total of 5 pairs of equal adjacent parts giving a(4) = 5.
-
C_xz(s,N) = {my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_xz(s[^i],N+1) * x^(s[i])/(1-(x^(s[i]))*(z-1)) )/(1-sum(i=1,#s, x^(s[i])/(1-(x^(s[i]))*(z-1)))))); return(g)}
B_xz(N) = {my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += C_xz(vector(j, i, i), N+1); j+=1); h}
P_xz(N) = Pol(B_xz(N), {x})
B_x(N) = {my(cx = deriv(P_xz(N),z), z=1); Vecrev(eval(cx))}
B_x(20)
A380176
Number of pairs of adjacent equal parts in all gap-free compositions of n.
Original entry on oeis.org
0, 0, 1, 2, 6, 12, 26, 56, 124, 266, 563, 1204, 2573, 5468, 11559, 24370, 51281, 107720, 225867, 472660, 987378, 2059180, 4287932, 8916624, 18517398, 38406486, 79563118, 164636582, 340308519, 702713844, 1449664783, 2987870476, 6152930738, 12660419370, 26030245642
Offset: 0
The gap-free compositions of n = 4 are: (4), (2,2), (1,1,2), (1,2,1), (2,1,1), and (1,1,1,1); having a total of 6 pairs of equal adjacent parts giving a(4) = 6.
-
C_xz(s,N) = {my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_xz(s[^i],N+1) * x^(s[i])/(1-(x^(s[i]))*(z-1)) )/(1-sum(i=1,#s, x^(s[i])/(1-(x^(s[i]))*(z-1)))))); return(g)}
B_xz(N) = {my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, for(k=0,N, h += C_xz([(1+k)..(j+k)], N+1)); j+=1); h}
P_xz(N) = Pol(B_xz(N), {x})
B_x(N) = {my(cx = deriv(P_xz(N),z), z=1); Vecrev(eval(cx))}
B_x(20)
Showing 1-4 of 4 results.
Comments