Master Mathematics.

Combinatorics · Hard · Advanced Counting Techniques · Problem 1

Alternating sequences from 1 to 20

A finite sequence of numbers is said to be alternating if or . How many alternating sequences of length , with distinct numbers , can be formed such that for ?

Source: ISI BStat/BMath