A025048
Number of up/down (initially ascending) compositions of n.
Original entry on oeis.org
1, 1, 1, 2, 3, 4, 7, 11, 16, 26, 41, 64, 100, 158, 247, 389, 612, 960, 1509, 2372, 3727, 5858, 9207, 14468, 22738, 35737, 56164, 88268, 138726, 218024, 342652, 538524, 846358, 1330160, 2090522, 3285526, 5163632, 8115323, 12754288, 20045027, 31503382
Offset: 0
From _Gus Wiseman_, Jan 15 2022: (Start)
The a(1) = 1 through a(7) = 11 up/down compositions:
(1) (2) (3) (4) (5) (6) (7)
(1,2) (1,3) (1,4) (1,5) (1,6)
(1,2,1) (2,3) (2,4) (2,5)
(1,3,1) (1,3,2) (3,4)
(1,4,1) (1,4,2)
(2,3,1) (1,5,1)
(1,2,1,2) (2,3,2)
(2,4,1)
(1,2,1,3)
(1,3,1,2)
(1,2,1,2,1)
(End)
The case of permutations is
A000111.
The version for patterns is
A350354.
These compositions are ranked by
A350355.
A025049
Number of down/up (initially descending) compositions of n.
Original entry on oeis.org
1, 1, 1, 2, 2, 4, 6, 9, 14, 23, 35, 55, 87, 136, 214, 337, 528, 830, 1306, 2051, 3223, 5067, 7962, 12512, 19667, 30908, 48574, 76343, 119982, 188565, 296358, 465764, 732006, 1150447, 1808078, 2841627, 4465992, 7018891, 11031101, 17336823, 27247087, 42822355
Offset: 0
From _Gus Wiseman_, Jan 28 2022: (Start)
The a(1) = 1 through a(8) = 14 down/up compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(2,1) (3,1) (3,2) (4,2) (4,3) (5,3)
(4,1) (5,1) (5,2) (6,2)
(2,1,2) (2,1,3) (6,1) (7,1)
(3,1,2) (2,1,4) (2,1,5)
(2,1,2,1) (3,1,3) (3,1,4)
(4,1,2) (3,2,3)
(2,1,3,1) (4,1,3)
(3,1,2,1) (5,1,2)
(2,1,3,2)
(2,1,4,1)
(3,1,3,1)
(4,1,2,1)
(2,1,2,1,2)
(End)
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Mohammed L. Nadji, Moussa Ahmia, Daniel F. Checa, and José L. Ramírez, Arndt Compositions with Restricted Parts, Palindromes, and Colored Variants, J. Int. Seq. (2025) Vol. 28, Issue 3, Article 25.3.6. See p. 12.
- Wikipedia, Alternating permutation
The case of permutations is
A000111.
The version for patterns is
A350354.
These compositions are ranked by
A350356.
-
doupQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]y[[m+1]]],{m,1,Length[y]-1}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],doupQ]],{n,0,15}] (* Gus Wiseman, Jan 28 2022 *)
A351010
Numbers k such that the k-th composition in standard order is a concatenation of twins (x,x).
Original entry on oeis.org
0, 3, 10, 15, 36, 43, 58, 63, 136, 147, 170, 175, 228, 235, 250, 255, 528, 547, 586, 591, 676, 683, 698, 703, 904, 915, 938, 943, 996, 1003, 1018, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2362, 2367, 2696, 2707, 2730, 2735, 2788, 2795, 2810, 2815, 3600, 3619
Offset: 1
The terms together with their binary expansions and the corresponding compositions begin:
0: 0 ()
3: 11 (1,1)
10: 1010 (2,2)
15: 1111 (1,1,1,1)
36: 100100 (3,3)
43: 101011 (2,2,1,1)
58: 111010 (1,1,2,2)
63: 111111 (1,1,1,1,1,1)
136: 10001000 (4,4)
147: 10010011 (3,3,1,1)
170: 10101010 (2,2,2,2)
175: 10101111 (2,2,1,1,1,1)
228: 11100100 (1,1,3,3)
235: 11101011 (1,1,2,2,1,1)
250: 11111010 (1,1,1,1,2,2)
255: 11111111 (1,1,1,1,1,1,1,1)
The case of twins (binary weight 2) is
A000120.
The Heinz numbers of these compositions are given by
A000290.
All terms are evil numbers
A001969.
The strict case (distinct twins) is
A351009, counted by
A032020 with 0's.
The anti-run case is
A351011, counted by
A003242 interspersed with 0's.
A011782 counts integer compositions.
A351014 counts distinct runs in standard compositions.
Cf.
A018819,
A025047,
A027383,
A035457,
A053738,
A088218,
A106356,
A238279,
A344604,
A351012,
A351015.
Selected statistics of standard compositions:
- Number of distinct parts is
A334028.
Selected classes of standard compositions:
- Constant compositions are
A272919.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,100],And@@EvenQ/@Length/@Split[stc[#]]&]
A350355
Numbers k such that the k-th composition in standard order is up/down.
Original entry on oeis.org
0, 1, 2, 4, 6, 8, 12, 13, 16, 20, 24, 25, 32, 40, 41, 48, 49, 50, 54, 64, 72, 80, 81, 82, 96, 97, 98, 102, 108, 109, 128, 144, 145, 160, 161, 162, 166, 192, 193, 194, 196, 198, 204, 205, 216, 217, 256, 272, 288, 289, 290, 320, 321, 322, 324, 326, 332, 333, 384
Offset: 1
The terms together with the corresponding compositions begin:
0: ()
1: (1)
2: (2)
4: (3)
6: (1,2)
8: (4)
12: (1,3)
13: (1,2,1)
16: (5)
20: (2,3)
24: (1,4)
25: (1,3,1)
32: (6)
40: (2,4)
41: (2,3,1)
48: (1,5)
49: (1,4,1)
50: (1,3,2)
54: (1,2,1,2)
The case of permutations is counted by
A000111.
Counting patterns of this type gives
A350354.
A003242 counts anti-run compositions.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Number of maximal anti-runs is
A333381.
- Number of distinct parts is
A334028.
Classes of standard compositions:
- Constant compositions are
A272919.
Cf.
A008965,
A049774,
A095684,
A106356,
A238279,
A344604,
A344614,
A344615,
A345169,
A345170,
A345172,
A349051,
A349799.
A351011
Numbers k such that the k-th composition in standard order has even length and alternately equal and unequal parts, i.e., all run-lengths equal to 2.
Original entry on oeis.org
0, 3, 10, 36, 43, 58, 136, 147, 228, 235, 528, 547, 586, 676, 698, 904, 915, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 2795, 3600, 3619, 3658, 3748, 3770, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 9444, 9451, 10768, 10787, 10826, 11144, 11155, 14368
Offset: 1
The terms together with their binary expansions and standard compositions begin:
0: 0 ()
3: 11 (1,1)
10: 1010 (2,2)
36: 100100 (3,3)
43: 101011 (2,2,1,1)
58: 111010 (1,1,2,2)
136: 10001000 (4,4)
147: 10010011 (3,3,1,1)
228: 11100100 (1,1,3,3)
235: 11101011 (1,1,2,2,1,1)
528: 1000010000 (5,5)
547: 1000100011 (4,4,1,1)
586: 1001001010 (3,3,2,2)
676: 1010100100 (2,2,3,3)
698: 1010111010 (2,2,1,1,2,2)
904: 1110001000 (1,1,4,4)
915: 1110010011 (1,1,3,3,1,1)
The case of twins (binary weight 2) is
A000120.
All terms are evil numbers
A001969.
These compositions are counted by
A003242 interspersed with 0's.
The Heinz numbers of these compositions are
A062503.
This is the anti-run case of
A351010.
A351014 counts distinct runs in standard compositions.
Cf.
A008965,
A018819,
A027383,
A032020,
A035363,
A088218,
A106356,
A122129,
A122134,
A238279,
A351007.
Selected statistics of standard compositions:
- Number of distinct parts is
A334028.
Selected classes of standard compositions:
- Constant compositions are
A272919.
-
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,1000],And@@(#==2&)/@Length/@Split[stc[#]]&]
Showing 1-5 of 5 results.
Comments