login
Number of non-alternating anti-run compositions of n.
18

%I #18 Jan 31 2024 15:50:34

%S 0,0,0,0,0,0,2,4,10,23,49,96,192,368,692,1299,2403,4400,8029,14556,

%T 26253,47206,84574,151066,269244,478826,849921,1506309,2665829,

%U 4711971,8319763,14675786,25865400,45552678,80171353,141015313,247905305,435614270,765132824

%N Number of non-alternating anti-run compositions of n.

%C 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).

%C An anti-run (separation or Carlitz composition) is a sequence with no adjacent equal parts.

%H Andrew Howroyd, <a href="/A345195/b345195.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A003242(n) - A025047(n).

%e The a(9) = 23 anti-runs:

%e (1,2,6) (1,2,4,2) (1,2,1,2,3)

%e (1,3,5) (1,2,5,1) (1,2,3,1,2)

%e (2,3,4) (1,3,4,1) (1,2,3,2,1)

%e (4,3,2) (1,4,3,1) (1,3,2,1,2)

%e (5,3,1) (1,5,2,1) (2,1,2,3,1)

%e (6,2,1) (2,1,2,4) (2,1,3,2,1)

%e (2,4,2,1) (3,2,1,2,1)

%e (3,1,2,3)

%e (3,2,1,3)

%e (4,2,1,2)

%t wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];

%t sepQ[y_]:=!MatchQ[y,{___,x_,x_,___}];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], sepQ[#]&&!wigQ[#]&]],{n,0,15}]

%Y Non-anti-run compositions are counted by A261983.

%Y A version counting partitions is A345166, ranked by A345173.

%Y These compositions are ranked by A345169.

%Y Non-alternating compositions are counted by A345192, ranked by A345168.

%Y A001250 counts alternating permutations, complement A348615.

%Y A003242 counts anti-run compositions, ranked by A333489.

%Y A011782 counts compositions.

%Y A025047 counts alternating or wiggly compositions, ranked by A345167.

%Y A032020 counts strict compositions.

%Y A106356 counts compositions by number of maximal anti-runs.

%Y A325534 counts separable partitions, ranked by A335433.

%Y A325535 counts inseparable partitions, ranked by A335448.

%Y A345164 counts alternating permutations of prime indices, w/ twins A344606.

%Y A345165 counts partitions w/o an alternating permutation, ranked by A345171.

%Y A345170 counts partitions w/ an alternating permutation, ranked by A345172.

%Y A345194 counts alternating patterns (with twins: A344605).

%Y Cf. A005649, A008965, A114901, A178470, A333755, A344604, A344614, A344654, A344740, A345162, A345163, A348380, A348612, A348613.

%K nonn

%O 0,7

%A _Gus Wiseman_, Jun 17 2021

%E a(21) onwards from _Andrew Howroyd_, Jan 31 2024