Problem

Source: Nordic Mathematical Contest 2015 #4

Tags: combinatorics



An encyclopedia consists of ${2000}$ numbered volumes. The volumes are stacked in order with number ${1}$ on top and ${2000}$ in the bottom. One may perform two operations with the stack: (i) For ${n}$ even, one may take the top ${n}$ volumes and put them in the bottom of the stack without changing the order. (ii) For ${n}$ odd, one may take the top ${n}$ volumes, turn the order around and put them on top of the stack again. How many different permutations of the volumes can be obtained by using these two operations repeatedly?