

A345195


Number of nonalternating antirun compositions of n.


7



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 antirun permutations (2,3,2,1,2) and (2,1,2,3,2).
An antirun (separation or Carlitz composition) is a sequence with no adjacent equal parts.


LINKS

Table of n, a(n) for n=0..20.


FORMULA

a(n) = A003242(n)  A025047(n).


EXAMPLE

The a(9) = 23 antiruns:
(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

Nonantirun compositions are counted by A261983.
A version counting partitions is A345166, ranked by A345173.
These compositions are ranked by A345169.
Nonalternating compositions are counted by A345192, ranked by A345168.
A001250 counts alternating permutations, complement A348615.
A003242 counts antirun compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A032020 counts strict compositions.
A106356 counts compositions by number of maximal antiruns.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
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.
A345194 counts alternating patterns (with twins: A344605).
Cf. A005649, A008965, A114901, A178470, A333755, A344604, A344614, A344654, A344740, A345162, A345163, A348380, A348612, A348613.
Sequence in context: A294680 A189890 A189587 * A018111 A189594 A094987
Adjacent sequences: A345192 A345193 A345194 * A345196 A345197 A345198


KEYWORD

nonn,more


AUTHOR

Gus Wiseman, Jun 17 2021


STATUS

approved



