A356842
Numbers k such that the k-th composition in standard order does not cover an interval of positive integers (not gapless).
Original entry on oeis.org
9, 12, 17, 19, 24, 25, 28, 33, 34, 35, 39, 40, 48, 49, 51, 56, 57, 60, 65, 66, 67, 69, 70, 71, 73, 76, 79, 80, 81, 88, 96, 97, 98, 99, 100, 103, 104, 112, 113, 115, 120, 121, 124, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 144, 145
Offset: 1
The terms and their corresponding standard compositions begin:
9: (3,1)
12: (1,3)
17: (4,1)
19: (3,1,1)
24: (1,4)
25: (1,3,1)
28: (1,1,3)
33: (5,1)
34: (4,2)
35: (4,1,1)
39: (3,1,1,1)
40: (2,4)
48: (1,5)
49: (1,4,1)
51: (1,3,1,1)
56: (1,1,4)
57: (1,1,3,1)
60: (1,1,1,3)
See link for sequences related to standard compositions.
These compositions are counted by the complement of
A107428.
A356233 counts factorizations into gapless numbers.
A356844 ranks compositions with at least one 1.
-
nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!nogapQ[stc[#]]&]
A374147
Number of complete Carlitz compositions of n.
Original entry on oeis.org
1, 0, 2, 1, 1, 8, 7, 9, 20, 49, 72, 115, 202, 349, 695, 1171, 2009, 3530, 6203, 10818, 19320, 33961, 59449, 104349, 183370, 321635, 564081, 992513, 1741441, 3057547, 5363570, 9410785, 16516575, 28967505, 50798456, 89106542, 156276871, 274037619, 480437247, 842350671, 1476760717, 2588651452, 4537418431, 7952741429, 13938276465
Offset: 1
a(7) = 7 counts: (1,2,1,3), (1,2,3,1), (1,3,2,1), (1,3,1,2), (2,1,3,1), (3,2,1,2), (1,2,1,2,1).
-
Ca_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, (Ca_x(s[^i],N) * x^(s[i])/(1+x^(s[i]))))/(1-sum(i=1,#s, (x^(s[i]))/(1+x^(s[i])))))); return(g)}
B_x(N)={my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += Ca_x([1..j],N+1); j+=1); my(a = Vec(h)); vector(N,i,a[i])}
B_x(45)
A356604
Number of integer compositions of n into odd parts covering an initial interval of odd positive integers.
Original entry on oeis.org
1, 1, 1, 1, 3, 4, 5, 9, 13, 24, 40, 61, 101, 160, 257, 415, 679, 1103, 1774, 2884, 4656, 7517, 12165, 19653, 31753, 51390, 83134, 134412, 217505, 351814, 569081, 920769, 1489587, 2409992, 3899347, 6309059, 10208628, 16518910, 26729830, 43254212, 69994082
Offset: 0
The a(1) = 1 through a(8) = 13 compositions:
(1) (11) (111) (13) (113) (1113) (133) (1133)
(31) (131) (1131) (313) (1313)
(1111) (311) (1311) (331) (1331)
(11111) (3111) (11113) (3113)
(111111) (11131) (3131)
(11311) (3311)
(13111) (111113)
(31111) (111131)
(1111111) (111311)
(113111)
(131111)
(311111)
(11111111)
The a(9) = 24 compositions:
(135) (11133) (1111113) (111111111)
(153) (11313) (1111131)
(315) (11331) (1111311)
(351) (13113) (1113111)
(513) (13131) (1131111)
(531) (13311) (1311111)
(31113) (3111111)
(31131)
(31311)
(33111)
These compositions are ranked by the intersection of
A060142 and
A333217.
This is the odd initial case of
A107428.
This is the odd restriction of
A107429.
The non-initial version is
A356605.
A055932 lists numbers with prime indices covering an initial interval.
-
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[(#+1)/2]&]],{n,0,15}]
A356846
Number of integer compositions of n into parts not covering an interval of positive integers.
Original entry on oeis.org
0, 0, 0, 0, 2, 5, 11, 25, 57, 115, 236, 482, 978, 1986, 4003, 8033, 16150, 32402, 64943, 130207, 260805, 522123, 1045168, 2091722, 4185431, 8374100, 16753538, 33515122, 67042865, 134106640, 268246886, 536549760, 1073194999, 2146553011, 4293391411, 8587283895
Offset: 0
The a(0) = 0 through a(6) = 8 compositions:
. . . . (13) (14) (15)
(31) (41) (24)
(113) (42)
(131) (51)
(311) (114)
(141)
(411)
(1113)
(1131)
(1311)
(3111)
-
gappyQ[m_]:=And[m!={},Union[m]!=Range[Min[m],Max[m]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],gappyQ]],{n,0,15}]
A374726
Number of gap-free Carlitz compositions of n.
Original entry on oeis.org
1, 1, 3, 2, 4, 9, 11, 11, 29, 53, 82, 129, 215, 389, 726, 1237, 2079, 3660, 6386, 11127, 19719, 34658, 60358, 105776, 185641, 324822, 569565, 999824, 1753763, 3075263, 5390839, 9452903, 16579307, 29065205, 50947822, 89330076, 156628094, 274559046, 481250343
Offset: 1
a(6) = 9 counts: (1,2,1,2), (2,1,2,1), (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1), (6).
-
Ca_x(s, N)={my(x='x+O('x^N), g=if(#s <1, 1, sum(i=1, #s, (Ca_x(s[^i], N) * x^(s[i])/(1+x^(s[i]))))/(1-sum(i=1, #s, (x^(s[i]))/(1+x^(s[i])))))); return(g)}
B_x(N)={my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, for(k=0,N, h += Ca_x([(1+k)..(j+k)], N+1)); j++); my(a = Vec(h)); vector(N, i, a[i])}
B_x(20)
A356605
Number of integer compositions of n into odd parts covering an interval of odd positive integers.
Original entry on oeis.org
1, 1, 1, 2, 3, 5, 6, 10, 15, 26, 41, 65, 104, 164, 262, 424, 687, 1112, 1792, 2898, 4677, 7556, 12197, 19699, 31836, 51466, 83234, 134593, 217674, 352057, 569452, 921165, 1490173, 2410784, 3900288, 6310436, 10210358, 16521108, 26733020, 43258086, 69999295
Offset: 0
The a(1) = 1 through a(8) = 15 compositions:
(1) (11) (3) (13) (5) (33) (7) (35)
(111) (31) (113) (1113) (133) (53)
(1111) (131) (1131) (313) (1133)
(311) (1311) (331) (1313)
(11111) (3111) (11113) (1331)
(111111) (11131) (3113)
(11311) (3131)
(13111) (3311)
(31111) (111113)
(1111111) (111131)
(111311)
(113111)
(131111)
(311111)
(11111111)
These compositions are ranked by the intersection of
A060142 and
A356841.
-
nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@OddQ/@#&&nogapQ[(#+1)/2]&]],{n,0,15}]
A371417
Triangle read by rows: T(n,k) is the number of complete compositions of n with k parts.
Original entry on oeis.org
1, 0, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 3, 1, 0, 0, 0, 3, 4, 1, 0, 0, 0, 6, 6, 5, 1, 0, 0, 0, 0, 16, 10, 6, 1, 0, 0, 0, 0, 12, 30, 15, 7, 1, 0, 0, 0, 0, 12, 35, 50, 21, 8, 1, 0, 0, 0, 0, 24, 50, 75, 77, 28, 9, 1, 0, 0, 0, 0, 0, 90, 126, 140, 112, 36, 10, 1
Offset: 0
The triangle begins:
k=0 1 2 3 4 5 6 7 8 9 10
n=0: 1;
n=1: 0, 1;
n=2: 0, 0, 1;
n=3: 0, 0, 2, 1;
n=4: 0, 0, 0, 3, 1;
n=5: 0, 0, 0, 3, 4, 1;
n=6: 0, 0, 0, 6, 6, 5, 1;
n=7: 0, 0, 0, 0, 16, 10, 6, 1;
n=8: 0, 0, 0, 0, 12, 30, 15, 7, 1;
n=9: 0, 0, 0, 0, 12, 35, 50, 21, 8, 1;
n=10: 0, 0, 0, 0, 24, 50, 75, 77, 28, 9, 1;
...
For n = 5 there are a total of 8 complete compositions:
T(5,3) = 3: (221), (212), (122)
T(5,4) = 4: (2111), (1211), (1121), (1112)
T(5,5) = 1: (11111)
A107428 counts gap-free compositions.
A251729 counts gap-free but not complete compositions.
Cf.
A107429 (row sums give complete compositions of n),
A000670 (column sums),
A152947 (number of nonzero terms per column).
-
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(i=0, t!, 0), `if`(i<1 or n (p-> seq(coeff(p, x, i), i=0..n))(add(b(n, i, 0), i=0..n)):
seq(T(n), n=0..12); # Alois P. Heinz, Apr 03 2024
-
G(N)={ my(z='z+O('z^N)); Vec(sum(i=1,N,z^(i*(i+1)/2)*t^i*prod(j=1,i,sum(k=0,N, (z^(j*k)*t^k)/(k+1)!))))}
my(v=G(10)); for(n=0, #v, if(n<1,print([1]), my(p=v[n], r=vector(n+1)); for(k=0, n, r[k+1] =k!*polcoeff(p, k)); print(r)))
A374727
Number of n-color complete compositions of n.
Original entry on oeis.org
1, 1, 1, 1, 7, 13, 45, 91, 233, 477, 1079, 2205, 4709, 10299, 22393, 52005, 125055, 310373, 799677, 2096699, 5556681, 14806685, 39417431, 104570549, 276027337, 724183555, 1887993925, 4891368373, 12595644523, 32252683453, 82146468813, 208225916203, 525472131209
Offset: 1
a(6) = 13 counts: (1,1,1,1,1,1) and the 12 permutations of parts 1, 1, 2_a, and 2_b.
-
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)
A374728
Number of n-color gap-free compositions of n.
Original entry on oeis.org
1, 1, 1, 3, 7, 19, 45, 105, 239, 507, 1079, 2303, 4829, 10425, 23263, 53363, 127995, 318983, 816057, 2133241, 5640135, 14975051, 39772751, 105322879, 277547989, 727276225, 1894282195, 4903985955, 12621154315, 32302574959, 82248961437, 208426306113, 525884062427
Offset: 1
a(5) = 7 counts: (1,1,1,1,1), (1,2_a,2_b), (1,2_b,2_a), (2_a,1,2_b), (2_a,2_b,1), (2_b,1,2_a), (2_b,2_a,1).
-
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+1) * x^(s[i]) )/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
B_x(N)={my(x='x+O('x^N), h=0); for(u=1,N, my(j=0); while(vecsum(colr(u,u+j)) <= N, h += C_x(colr(u,u+j),N+1); j++)); my(a = Vec(h)); vector(N, i, a[i])}
B_x(20)
A356737
Number of integer partitions of n into odd parts covering an interval of odd numbers.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 7, 8, 9, 10, 13, 13, 15, 17, 19, 21, 25, 26, 29, 33, 37, 40, 46, 49, 54, 61, 66, 72, 81, 87, 97, 106, 115, 125, 139, 150, 163, 179, 193, 210, 232, 248, 269, 293, 317, 343, 373, 401, 433, 470, 507, 545, 590, 633, 682, 737, 790
Offset: 0
The a(1) = 1 through a(9) = 6 partitions:
1 11 3 31 5 33 7 53 9
111 1111 311 3111 331 3311 333
11111 111111 31111 311111 531
1111111 11111111 33111
3111111
111111111
The initial case for compositions is
A356604.
-
nogapQ[m_]:=Or[m=={},Union[m]==Range[Min[m],Max[m]]];
Table[Length[Select[IntegerPartitions[n],And@@OddQ/@#&&nogapQ[(#+1)/2]&]],{n,0,30}]
Comments