How many permutations of the
integers 1 through N consist of a
strictly ascending sequence followed
by a strictly descending sequence?
For example, for N = 9, one such
permutation is (1-4-5-7-9-8-6-3-2).
There must be at least two integers in
a sequence, and N is considered to be a
member of both sequences.
Reversals
are not considered to be different
permutations, i.e. (2-3-6-8-9-7-5-4-1) is
the same as the above example.
(In reply to
Derivation of formula by Jer)
To clear of any ambiguity, the first paragraph says that the whole number consists of 2 sequences. The second paragraph says that each sequence has at least two digits and that N, the largest digit, belongs to each of these tow sequences. So N can't be at an end.
|
Posted by Charlie
on 2025-01-11 14:05:40 |