The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A345195 Number of non-alternating anti-run 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 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 a(n) = A003242(n) - A025047(n). 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. A version counting partitions is A345166, ranked by A345173. These compositions are ranked by A345169. Non-alternating compositions are counted by A345192, ranked by A345168. A001250 counts alternating permutations, complement A348615. A003242 counts anti-run 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 anti-runs. 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 7 07:38 EST 2021. Contains 349571 sequences. (Running on oeis4.)