A329394
Number of compositions of n whose Lyndon and co-Lyndon factorizations both have the same length.
Original entry on oeis.org
1, 2, 2, 4, 4, 10, 13, 28, 46, 99, 175, 359, 672, 1358, 2627, 5238, 10262, 20438, 40320, 80137
Offset: 1
The a(1) = 1 through a(7) = 13 compositions:
(1) (2) (3) (4) (5) (6) (7)
(11) (111) (22) (131) (33) (151)
(121) (212) (141) (214)
(1111) (11111) (213) (232)
(222) (241)
(231) (313)
(1221) (1312)
(2112) (1321)
(11211) (2113)
(111111) (11311)
(12121)
(21112)
(1111111)
Lyndon and co-Lyndon compositions are (both) counted by
A059966.
Lyndon compositions that are not weakly increasing are
A329141.
Lyndon compositions of n whose reverse is not co-Lyndon are
A329324.
Cf.
A000740,
A001037,
A008965,
A060223,
A102659,
A211100,
A275692,
A328596,
A329312,
A329318,
A329395,
A329398.
-
lynQ[q_]:=Array[Union[{q,RotateRight[q,#]}]=={q,RotateRight[q,#]}&,Length[q]-1,1,And];
lynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[lynfac[Drop[q,i]],Take[q,i]]][Last[Select[Range[Length[q]],lynQ[Take[q,#]]&]]]];
colynQ[q_]:=Array[Union[{RotateRight[q,#],q}]=={RotateRight[q,#],q}&,Length[q]-1,1,And];
colynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[colynfac[Drop[q,i]],Take[q,i]]]@Last[Select[Range[Length[q]],colynQ[Take[q,#]]&]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[lynfac[#]]==Length[colynfac[#]]&]],{n,10}]
A329397
Number of compositions of n whose Lyndon factorization is uniform.
Original entry on oeis.org
1, 2, 4, 7, 12, 20, 33, 55, 92, 156, 267, 466, 822, 1473, 2668, 4886, 9021, 16786, 31413, 59101, 111654, 211722, 402697, 768025, 1468170, 2812471, 5397602, 10376418, 19978238, 38519537, 74365161, 143742338, 278156642, 538831403, 1044830113, 2027879831
Offset: 1
The a(1) = 1 through a(6) = 20 Lyndon factorizations:
(1) (2) (3) (4) (5) (6)
(1)(1) (12) (13) (14) (15)
(2)(1) (112) (23) (24)
(1)(1)(1) (2)(2) (113) (114)
(3)(1) (122) (123)
(2)(1)(1) (1112) (132)
(1)(1)(1)(1) (3)(2) (1113)
(4)(1) (1122)
(2)(2)(1) (3)(3)
(3)(1)(1) (4)(2)
(2)(1)(1)(1) (5)(1)
(1)(1)(1)(1)(1) (11112)
(12)(12)
(2)(2)(2)
(3)(2)(1)
(4)(1)(1)
(2)(2)(1)(1)
(3)(1)(1)(1)
(2)(1)(1)(1)(1)
(1)(1)(1)(1)(1)(1)
Lyndon and co-Lyndon compositions are (both) counted by
A059966.
Lyndon compositions that are not weakly increasing are
A329141.
Lyndon compositions whose reverse is not co-Lyndon are
A329324.
Cf.
A000740,
A001037,
A008965,
A060223,
A102659,
A211100,
A275692,
A328596,
A329312,
A329318,
A329395,
A329396,
A329398,
A329399.
-
lynQ[q_]:=Array[Union[{q,RotateRight[q,#]}]=={q,RotateRight[q,#]}&,Length[q]-1,1,And];
lynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[lynfac[Drop[q,i]],Take[q,i]]][Last[Select[Range[Length[q]],lynQ[Take[q,#]]&]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Length/@lynfac[#]&]],{n,10}]
-
EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
B(n,k) = {sumdiv(n, d, moebius(d)/(1-x^d)^(n/d) + O(x*x^k))/n}
seq(n) = {sum(d=1, n-1, my(v=Vec(B(d,n-d),-n)); EulerT(v))} \\ Andrew Howroyd, Feb 03 2022
A335375
Numbers k such that the k-th composition in standard order (A066099) is neither unimodal nor co-unimodal.
Original entry on oeis.org
45, 54, 77, 89, 91, 93, 102, 108, 109, 110, 118, 141, 153, 155, 157, 166, 173, 177, 178, 179, 181, 182, 183, 185, 187, 189, 198, 204, 205, 206, 214, 216, 217, 218, 219, 220, 221, 222, 230, 236, 237, 238, 246, 269, 281, 283, 285, 297, 301, 305, 306, 307, 309
Offset: 1
The sequence together with the corresponding compositions begins:
45: (2,1,2,1)
54: (1,2,1,2)
77: (3,1,2,1)
89: (2,1,3,1)
91: (2,1,2,1,1)
93: (2,1,1,2,1)
102: (1,3,1,2)
108: (1,2,1,3)
109: (1,2,1,2,1)
110: (1,2,1,1,2)
118: (1,1,2,1,2)
141: (4,1,2,1)
153: (3,1,3,1)
155: (3,1,2,1,1)
157: (3,1,1,2,1)
166: (2,3,1,2)
173: (2,2,1,2,1)
177: (2,1,4,1)
178: (2,1,3,2)
179: (2,1,3,1,1)
Non-unimodal compositions are ranked by
A335373.
Non-co-unimodal compositions are ranked by
A335374.
Unimodal normal sequences are
A007052.
Non-unimodal permutations are
A059204.
Non-unimodal compositions are
A115981.
Non-unimodal normal sequences are
A328509.
Numbers with non-unimodal unsorted prime signature are
A332282.
Co-unimodal compositions are
A332578.
Numbers with non-co-unimodal unsorted prime signature are
A332642.
Non-co-unimodal compositions are
A332669.
Cf.
A112798,
A227038,
A329398,
A332281,
A332286,
A332287,
A332638,
A332639,
A332643,
A332670,
A332873,
A333146.
-
unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!unimodQ[stc[#]]&&!unimodQ[-stc[#]]&]
A375408
Numbers k such that the k-th composition in standard order is not weakly increasing or weakly decreasing.
Original entry on oeis.org
13, 22, 25, 27, 29, 38, 41, 44, 45, 46, 49, 50, 51, 53, 54, 55, 57, 59, 61, 70, 76, 77, 78, 81, 82, 83, 86, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 134, 140, 141, 142
Offset: 1
The terms and corresponding compositions begin:
13: (1,2,1)
22: (2,1,2)
25: (1,3,1)
27: (1,2,1,1)
29: (1,1,2,1)
38: (3,1,2)
41: (2,3,1)
44: (2,1,3)
45: (2,1,2,1)
46: (2,1,1,2)
49: (1,4,1)
50: (1,3,2)
51: (1,3,1,1)
53: (1,2,2,1)
54: (1,2,1,2)
55: (1,2,1,1,1)
57: (1,1,3,1)
59: (1,1,2,1,1)
The version for run-lengths of compositions is
A332833.
Compositions of this type are counted by
A332834, complement maybe
A329398.
A001523 counts unimodal compositions, ranks too dense.
A332835 counts compositions with weakly incr. or weakly decr. run-lengths.
All of the following pertain to compositions in standard order:
- Ranks of strict compositions are
A233564.
- Ranks of constant compositions are
A272919.
-
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],!LessEqual@@stc[#]&&!GreaterEqual@@stc[#]&]
Comments