Strict Arrangements

How many ways are there to arrange the digits 1 to 7 in a line such that no three consecutive digits are ascending?

For example:

  • 7132564 contains three consecutive ascending digits since 2<5<6.

  • 3215476 does not contain three consecutive ascending digits.


The answer is 2017.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Giorgos K.
Feb 22, 2018

Mathematica

Length@Select[Permutations[Range@7],!Or@@OrderedQ/@Partition[#,3,1]&]

2017

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...