|
|
A348377
|
|
Number of non-alternating compositions of n, excluding twins (x,x).
|
|
15
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
First differs from A348382 at a(6) = 19, A348382(6) = 17. The two non-alternating non-twin compositions of 6 that are not an anti-run are (1,2,3) and (3,2,1).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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)
|
|
MATHEMATICA
|
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], MatchQ[#, {___, x_, y_, z_, ___}/; x<=y<=z||x>=y>=z]&]], {n, 0, 15}]
|
|
CROSSREFS
|
Non-twin compositions are counted by A051049.
The complement is counted by A344604.
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.
A345165 = partitions with no alternating permutations, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.
Cf. A005649, A178470, A238279, A333755, A335126, A344653, A344740, A345166, A345169, A345173, A348379, A348381.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|