A333769
Irregular triangle read by rows where row k is the sequence of run-lengths of the k-th composition in standard order.
Original entry on oeis.org
1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 5, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 0
The standard compositions and their run-lengths:
0: () -> ()
1: (1) -> (1)
2: (2) -> (1)
3: (1,1) -> (2)
4: (3) -> (1)
5: (2,1) -> (1,1)
6: (1,2) -> (1,1)
7: (1,1,1) -> (3)
8: (4) -> (1)
9: (3,1) -> (1,1)
10: (2,2) -> (2)
11: (2,1,1) -> (1,2)
12: (1,3) -> (1,1)
13: (1,2,1) -> (1,1,1)
14: (1,1,2) -> (2,1)
15: (1,1,1,1) -> (4)
16: (5) -> (1)
17: (4,1) -> (1,1)
18: (3,2) -> (1,1)
19: (3,1,1) -> (1,2)
For example, the 119th composition is (1,1,2,1,1,1), so row 119 is (2,1,3).
Row k is the
A333627(k)-th standard composition.
A triangle counting compositions by runs-resistance is
A329744.
All of the following pertain to compositions in standard order (
A066099):
- Partial sums from the right are
A048793.
- Adjacent equal pairs are counted by
A124762.
- Partial sums from the left are
A272020.
- Constant compositions are
A272919.
- First appearances of run-resistances are
A333629.
- Combinatory separations are
A334030.
Cf.
A029931,
A098504,
A114994,
A181819,
A182850,
A225620,
A228351,
A238279,
A242882,
A318928,
A329747,
A333489,
A333630.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Table[Length/@Split[stc[n]],{n,0,30}]
A335451
Number of permutations of the prime indices of n with all equal parts contiguous and none appearing more than twice.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 2, 0, 1, 2, 1, 2, 2, 2, 1, 0, 1, 2, 0, 2, 1, 6, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 6, 1, 2, 2, 2, 1, 0, 1, 2, 2, 2, 1, 0, 2, 0, 2, 2, 1, 6, 1, 2, 2, 0, 2, 6, 1, 2, 2, 6, 1, 0, 1, 2, 2, 2, 2, 6, 1, 0, 0, 2, 1, 6, 2, 2, 2
Offset: 1
The a(90) = 6 permutations are (1,2,2,3), (1,3,2,2), (2,2,1,3), (2,2,3,1), (3,1,2,2), (3,2,2,1).
Permutations of prime indices are counted by
A008480.
Unsorted prime signature is
A124010. Sorted prime signature is
A118914.
Permutations of prime indices with equal parts contiguous are
A333175.
STC-numbers of permutations of prime indices are
A333221.
(1,2,1) and (2,1,2)-avoiding permutations of prime indices are
A333175.
Numbers whose prime indices are inseparable are
A335448.
(1,2,1) or (2,1,2)-matching permutations of prime indices are
A335460.
(1,2,1) and (2,1,2)-matching permutations of prime indices are
A335462.
Strict permutations of prime indices are counted by
A335489.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Length[Select[Permutations[primeMS[n]],!MatchQ[#,{_,x_,,x_,_}]&]],{n,100}]
A349800
Number of integer compositions of n that are weakly alternating and have at least two adjacent equal parts.
Original entry on oeis.org
0, 0, 1, 1, 4, 9, 16, 33, 62, 113, 205, 373, 664, 1190, 2113, 3744, 6618, 11683, 20564, 36164, 63489, 111343, 195042, 341357, 596892, 1042976, 1821179, 3178145, 5543173, 9663545, 16839321, 29332231, 51075576, 88908912, 154722756, 269186074, 468221264
Offset: 0
The a(2) = 1 through a(6) = 16 compositions:
(1,1) (1,1,1) (2,2) (1,1,3) (3,3)
(1,1,2) (1,2,2) (1,1,4)
(2,1,1) (2,2,1) (2,2,2)
(1,1,1,1) (3,1,1) (4,1,1)
(1,1,1,2) (1,1,1,3)
(1,1,2,1) (1,1,2,2)
(1,2,1,1) (1,1,3,1)
(2,1,1,1) (1,3,1,1)
(1,1,1,1,1) (2,2,1,1)
(3,1,1,1)
(1,1,1,1,2)
(1,1,1,2,1)
(1,1,2,1,1)
(1,2,1,1,1)
(2,1,1,1,1)
(1,1,1,1,1,1)
The version counting permutations of prime indices is
A349798.
These compositions are ranked by
A349799.
A345165 = partitions without an alternating permutation, ranked by
A345171.
A345170 = partitions with an alternating permutation, ranked by
A345172.
A348377 = non-alternating non-twin compositions.
Weakly alternating:
-
A349057 = complement of standard composition numbers (too dense).
Cf.
A008965,
A011782,
A027383,
A096441,
A274230,
A333213,
A344614,
A344615,
A348382,
A348613,
A349796,
A350140.
-
wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],(whkQ[#]||whkQ[-#])&&!wigQ[#]&]],{n,0,10}]
A376306
Run-lengths of the sequence of first differences of squarefree numbers.
Original entry on oeis.org
2, 1, 2, 1, 1, 1, 2, 3, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1
Offset: 1
The sequence of squarefree numbers (A005117) is:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, ...
The sequence of first differences (A076259) of squarefree numbers is:
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, ...
with runs:
(1,1),(2),(1,1),(3),(1),(2),(1,1),(2,2,2),(1,1),(3,3),(1,1),(2),(1,1), ...
with lengths A376306 (this sequence).
Run-lengths of first differences of
A005117.
For prime instead of squarefree numbers we have
A333254.
For compression instead of run-lengths we have
A376305.
For run-sums instead of run-lengths we have
A376307.
For prime-powers instead of squarefree numbers we have
A376309.
For positions of first appearances instead of run-lengths we have
A376311.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A007674,
A053797,
A053806,
A061398,
A072284,
A112925,
A112926,
A120992,
A373198,
A375707,
A376312.
A376312
Run-compression of first differences (A078147) of nonsquarefree numbers (A013929).
Original entry on oeis.org
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 4, 1, 3, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 2, 1, 3, 4, 2, 4, 1, 2, 1, 3, 1, 4, 1, 3, 4, 2, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 3, 2, 4, 1, 3, 4, 2, 3, 1, 3, 1, 4, 1, 3, 2, 1, 3, 4, 2
Offset: 1
The sequence of nonsquarefree numbers (A013929) is:
4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, ...
with first differences (A078147):
4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, ...
with runs:
(4),(1),(3),(4),(2,2),(4),(1),(2),(1),(4,4,4,4),(1),(3),(1,1),(2,2,2), ...
and run-compression (A376312):
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, ...
For nonprime instead of squarefree numbers we have
A037201, halved
A373947.
For run-sums instead of compression we have
A376264.
For squarefree instead of nonsquarefree we have
A376305, ones
A376342.
For prime-powers instead of nonsquarefree numbers we have
A376308.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A007674,
A053797,
A053806,
A072284,
A112925,
A120992,
A274174,
A373198,
A375707,
A376306,
A376307,
A376311.
A376340
Sorted positions of first appearances in A057820, the sequence of first differences of prime-powers.
Original entry on oeis.org
1, 4, 9, 12, 18, 24, 34, 47, 60, 79, 117, 178, 198, 206, 215, 244, 311, 402, 465, 614, 782, 1078, 1109, 1234, 1890, 1939, 1961, 2256, 2290, 3149, 3377, 3460, 3502, 3722, 3871, 4604, 4694, 6634, 8073, 8131, 8793, 12370, 12661, 14482, 14990, 15912, 17140, 19166
Offset: 1
The terms together with their prime indices begin:
1: {}
4: {1,1}
9: {2,2}
12: {1,1,2}
18: {1,2,2}
24: {1,1,1,2}
34: {1,7}
47: {15}
60: {1,1,2,3}
79: {22}
117: {2,2,6}
178: {1,24}
198: {1,2,2,5}
206: {1,27}
215: {3,14}
244: {1,1,18}
For compression instead of sorted firsts we have
A376308.
For run-lengths instead of sorted firsts we have
A376309.
For run-sums instead of sorted firsts we have
A376310.
The version for squarefree numbers is the unsorted version of
A376311.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A001597,
A006549,
A007916,
A025475,
A037201,
A053289,
A078147,
A110969,
A120430,
A174965,
A373948,
A375706.
-
q=Differences[Select[Range[100],PrimePowerQ]];
Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]
A386585
Triangle read by rows where T(n,k) is the number of integer partitions y of n into k = 0..n parts such that any multiset whose multiplicities are the parts of y is separable.
Original entry on oeis.org
1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 2, 2, 1, 1, 0, 0, 1, 3, 3, 2, 1, 1, 0, 0, 1, 3, 4, 3, 2, 1, 1, 0, 0, 1, 5, 5, 5, 3, 2, 1, 1, 0, 0, 1, 4, 7, 6, 5, 3, 2, 1, 1
Offset: 0
Row n = 8 counts the following partitions:
. . 44 431 4211 41111 311111 2111111 11111111
422 3311 32111 221111
332 3221 22211
2222
with the following separable multisets:
. . 11112222 11112223 11112234 11112345 11123456 11234567 12345678
11112233 11122234 11122345 11223456
11122233 11122334 11223345
11223344
Triangle begins:
1
0 1
0 0 1
0 0 1 1
0 0 1 1 1
0 0 1 2 1 1
0 0 1 2 2 1 1
0 0 1 3 3 2 1 1
0 0 1 3 4 3 2 1 1
0 0 1 5 5 5 3 2 1 1
0 0 1 4 7 6 5 3 2 1 1
For separable instead of separable type we have
A386583, inseparable
A386584.
A279790 counts disjoint families on strongly normal multisets.
Cf.
A005651,
A106351,
A111133,
A238130,
A335434,
A386575,
A386576,
A386579,
A386580,
A386581,
A386582.
-
sepQ[y_]:=Select[Permutations[y],Length[Split[#]]==Length[y]&]!={};
mst[y_]:=Join@@Table[ConstantArray[k,y[[k]]],{k,Length[y]}];
Table[Length[Select[IntegerPartitions[n,{k}],sepQ[mst[#]]&]],{n,0,5},{k,0,n}]
A386586
Triangle read by rows where T(n,k) is the number of integer partitions y of n into k parts such that any multiset whose multiplicities are the parts of y is inseparable.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 3, 2, 1, 0, 0, 0, 0, 0, 1, 3, 2, 1, 0, 0, 0, 0, 0, 0, 1, 4, 4, 2, 1, 0, 0, 0, 0, 0
Offset: 0
The partition y = (7,2,1) is the multiplicities of the multiset {1,1,1,1,1,1,1,2,2,3}, which is inseparable, so y is counted under T(10,3).
Row n = 10 counts the following partitions (A = 10):
. A 91 811 7111 61111 . . . . .
82 721 6211
73 631
64 622
Triangle begins:
0
0 0
0 1 0
0 1 0 0
0 1 1 0 0
0 1 1 0 0 0
0 1 2 1 0 0 0
0 1 2 1 0 0 0 0
0 1 3 2 1 0 0 0 0
0 1 3 2 1 0 0 0 0 0
0 1 4 4 2 1 0 0 0 0 0
For separable instead of inseparable type we have
A386583.
For integer partitions instead of normal multisets we have
A386584.
For separable type instead of inseparable type we have
A386585.
-
insepQ[y_]:=Select[Permutations[y],Length[Split[#]]==Length[y]&]=={};
ptm[y_]:=Join@@Table[ConstantArray[k,y[[k]]],{k,Length[y]}];
Table[Length[Select[IntegerPartitions[n,{k}],insepQ[ptm[#]]&]],{n,0,5},{k,0,n}]
A374636
Number of integer compositions of n whose leaders of maximal weakly increasing runs are not weakly decreasing.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 3, 10, 28, 72, 178, 425, 985, 2237, 4999, 11016, 24006, 51822, 110983, 236064, 499168, 1050118, 2199304, 4587946, 9537506, 19765213, 40847186, 84205453, 173198096, 355520217, 728426569, 1489977348, 3043054678, 6206298312, 12641504738
Offset: 0
- The maximal weakly increasing runs of y = (1,1,3,2,1) are ((1,1,3),(2),(1)) with leaders (1,2,1) so y is counted under a(8). Also, y matches 1-32 and avoids 23-1.
- The maximal weakly increasing runs of y = (1,3,2,1,1) are ((1,3),(2),(1,1)) with leaders (1,2,1) so y is counted under a(8). Also, y matches 1-32 and avoids 23-1.
- The maximal weakly increasing runs of y = (2,3,1,1,1) are ((2,3),(1,1,1)) with leaders (2,1) so y is not counted under a(8). Also, y avoids 1-32 and matches 23-1.
- The maximal weakly increasing runs of y = (2,3,2,1) are ((2,3),(2),(1)) with leaders (2,2,1) so y is not counted under a(8). Also, y avoids 1-32 and matches 23-1.
- The maximal weakly increasing runs of y = (2,1,3,1,1) are ((2),(1,3),(1,1)) with leaders (2,1,1) so y is not counted under a(8). Also, y avoids both 1-32 and 23-1.
- The maximal weakly increasing runs of y = (2,1,1,3,1) are ((2),(1,1,3),(1)) with leaders (2,1,1) so y is not counted under a(8). Also, y avoids both 1-32 and 23-1.
The a(0) = 0 through a(8) = 10 compositions:
. . . . . . (132) (142) (143)
(1132) (152)
(1321) (1142)
(1232)
(1322)
(1421)
(2132)
(11132)
(11321)
(13211)
The reverse version is the same.
For leaders of identical runs we have
A056823.
The complement is counted by
A189076.
For weakly decreasing runs we have the complement of
A374747.
For leaders of strictly increasing runs we have
A375135, complement
A374697.
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
Cf.
A000041,
A188920,
A238343,
A238424,
A333213,
A373949,
A374632,
A374635,
A374678,
A374681,
A375297.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],!GreaterEqual@@First/@Split[#,LessEqual]&]],{n,0,15}]
(* or *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,y_,z_,_,x_,_}/;x
A374689
Number of integer compositions of n whose leaders of strictly increasing runs are strictly decreasing.
Original entry on oeis.org
1, 1, 1, 3, 3, 6, 10, 13, 21, 32, 48, 66, 101, 144, 207, 298, 415, 592, 833, 1163, 1615, 2247, 3088, 4259, 5845, 7977, 10862, 14752, 19969, 26941, 36310, 48725, 65279, 87228, 116274, 154660, 205305, 271879, 359400, 474157, 624257, 820450, 1076357, 1409598
Offset: 0
The a(0) = 1 through a(8) = 21 compositions:
() (1) (2) (3) (4) (5) (6) (7) (8)
(12) (13) (14) (15) (16) (17)
(21) (31) (23) (24) (25) (26)
(32) (42) (34) (35)
(41) (51) (43) (53)
(212) (123) (52) (62)
(213) (61) (71)
(231) (124) (125)
(312) (214) (134)
(321) (241) (215)
(313) (251)
(412) (314)
(421) (323)
(341)
(413)
(431)
(512)
(521)
(2123)
(2312)
(3212)
The weak version appears to be
A189076.
Ranked by positions of strictly decreasing rows in
A374683.
Types of runs (instead of strictly increasing):
- For leaders of identical runs we have
A000041.
- For leaders of anti-runs we have
A374680.
- For leaders of weakly increasing runs we have
A188920.
- For leaders of weakly decreasing runs we have
A374746.
- For leaders of strictly decreasing runs we have
A374763.
Types of run-leaders (instead of strictly decreasing):
- For strictly increasing leaders we have
A374688.
- For weakly increasing leaders we have
A374690.
- For weakly decreasing leaders we have
A374697.
A335456 counts patterns matched by compositions.
A374700 counts compositions by sum of leaders of strictly increasing runs.
-
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Greater@@First/@Split[#,Less]&]],{n,0,15}]
-
C_x(N) = {my(x='x+O('x^N), h=prod(i=1,N, 1+(x^i)*prod(j=i+1,N, 1+x^j))); Vec(h)}
C_x(50) \\ John Tyler Rascoe, Jul 29 2024
Comments