A344604 Number of alternating compositions of n, including twins (x,x).
1, 1, 2, 3, 5, 7, 13, 19, 30, 48, 76, 118, 187, 293, 461, 725, 1140, 1789, 2815, 4422, 6950, 10924, 17169, 26979, 42405, 66644, 104738, 164610, 258708, 406588, 639010, 1004287, 1578364, 2480606, 3898600, 6127152, 9629624, 15134213, 23785389, 37381849, 58750469
Offset: 0
Keywords
Examples
The a(1) = 1 through a(7) = 19 compositions: (1) (2) (3) (4) (5) (6) (7) (11) (12) (13) (14) (15) (16) (21) (22) (23) (24) (25) (31) (32) (33) (34) (121) (41) (42) (43) (131) (51) (52) (212) (132) (61) (141) (142) (213) (151) (231) (214) (312) (232) (1212) (241) (2121) (313) (412) (1213) (1312) (2131) (3121) (12121)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Crossrefs
A001250 counts alternating permutations.
A005649 counts anti-run patterns.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A325534 counts separable partitions.
A325535 counts inseparable partitions.
A344605 counts alternating patterns including twins.
A344606 counts alternating permutations of prime factors including twins.
Counting compositions by patterns:
- A011782 no conditions.
- A003242 avoiding (1,1) adjacent.
- A102726 avoiding (1,2,3).
- A106351 avoiding (1,1) adjacent by sum and length.
- A128695 avoiding (1,1,1) adjacent.
- A128761 avoiding (1,2,3) adjacent.
- A232432 avoiding (1,1,1).
- A335456 all patterns.
- A335457 all patterns adjacent.
- A335514 matching (1,2,3).
- A344614 avoiding (1,2,3) and (3,2,1) adjacent.
- A344615 weakly avoiding (1,2,3) adjacent.
Programs
Formula
Extensions
a(21)-a(40) from Alois P. Heinz, Nov 04 2021
Comments