A348377 Number of non-alternating compositions of n, excluding twins (x,x).
0, 0, 0, 1, 3, 9, 19, 45, 98, 208, 436, 906, 1861, 3803, 7731, 15659, 31628, 63747, 128257, 257722, 517338, 1037652, 2079983, 4167325, 8346203, 16710572, 33449694, 66944254, 133959020, 268028868, 536231902, 1072737537, 2145905284, 4292486690, 8586035992
Offset: 0
Keywords
Examples
The a(3) = 1 through a(6) = 19 compositions: (1,1,1) (1,1,2) (1,1,3) (1,1,4) (2,1,1) (1,2,2) (1,2,3) (1,1,1,1) (2,2,1) (2,2,2) (3,1,1) (3,2,1) (1,1,1,2) (4,1,1) (1,1,2,1) (1,1,1,3) (1,2,1,1) (1,1,2,2) (2,1,1,1) (1,1,3,1) (1,1,1,1,1) (1,2,2,1) (1,3,1,1) (2,1,1,2) (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)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
- Wikipedia, Alternating permutation
Crossrefs
Non-twin compositions are counted by A051049.
The complement is counted by A344604.
An unordered version is A344654.
The non-anti-run case is A348382.
A001250 counts alternating permutations.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A344614 counts compositions avoiding (1,2,3) and (3,2,1) adjacent.
Programs
Extensions
a(26) onwards from Andrew Howroyd, Jan 31 2024
Comments