|
|
A345195
|
|
Number of non-alternating anti-run compositions of n.
|
|
17
|
|
|
0, 0, 0, 0, 0, 0, 2, 4, 10, 23, 49, 96, 192, 368, 692, 1299, 2403, 4400, 8029, 14556, 26253
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
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).
An anti-run (separation or Carlitz composition) is a sequence with no adjacent equal parts.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The a(9) = 23 anti-runs:
(1,2,6) (1,2,4,2) (1,2,1,2,3)
(1,3,5) (1,2,5,1) (1,2,3,1,2)
(2,3,4) (1,3,4,1) (1,2,3,2,1)
(4,3,2) (1,4,3,1) (1,3,2,1,2)
(5,3,1) (1,5,2,1) (2,1,2,3,1)
(6,2,1) (2,1,2,4) (2,1,3,2,1)
(2,4,2,1) (3,2,1,2,1)
(3,1,2,3)
(3,2,1,3)
(4,2,1,2)
|
|
MATHEMATICA
|
wigQ[y_]:=Or[Length[y]==0, Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
sepQ[y_]:=!MatchQ[y, {___, x_, x_, ___}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], sepQ[#]&&!wigQ[#]&]], {n, 0, 15}]
|
|
CROSSREFS
|
Non-anti-run compositions are counted by A261983.
These compositions are ranked by A345169.
Non-alternating compositions are counted by A345192, ranked by A345168.
A032020 counts strict compositions.
A106356 counts compositions by number of maximal anti-runs.
A345164 counts alternating permutations of prime indices, w/ twins A344606.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
Cf. A005649, A008965, A114901, A178470, A333755, A344604, A344614, A344654, A344740, A345162, A345163, A348380, A348612, A348613.
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|