Permutations with inequalities constraint

In how many ways can I arrange the first $$6$$ positive integers such that this inequalities chain will hold?

$$a < b > c < d < e > f$$

One of these arrangements is $$\{5, 6, 1, 2, 4, 3\}$$, but how many is it possible to find?

• Why are you interested in this question? Sep 26, 2022 at 17:23
• I found in a FB group and I tried to resolve with Mathematica, but I was not able to Sep 26, 2022 at 17:24
• The notation $a < b > c < d < e > f$ is not correct. The right math notation is $a < b , b> c , c< d , d< e,e > f$. The austerity of 5 symbols is petty. Sep 27, 2022 at 4:42
• @user64494 The same FullForm[a < b > c] === FullForm[a < b && b > c] Sep 27, 2022 at 5:06
• @cvgmt: Sorry, don't unerstand: what are "the same"? The Mathematica notations are nonstandard sometimes and this may lead to errors and misunderstandings. Sep 27, 2022 at 6:18

pList = Cases[
Permutations[Range[6], {6}], {a_, b_, c_, d_, e_, f_} /;
a < b > c < d < e > f]

Length@pList


40

A variation using SequenceCountis possible with the same result.

SequenceCount[
Permutations[Range[6], {6}], {{a_, b_, c_, d_, e_, f_}} /;
a < b > c < d < e > f]

• Thank you! That was exactly what I needed. Now I'm asking if there is an analytical method to find that Sep 26, 2022 at 17:28
• You can post this as an addendum to your question, although such an analytical exercise is better suited for the Math SE site. Or you can post a separate question on the Math SE site and put a link to this post, if it helps the explanation. Thanks.
– Syed
Sep 26, 2022 at 17:32