Question: Suppose we have a set of numbers, $C=\{1,2,3,\dots,n\}$, and we have the function $\pi(x)$ that moves all elements to right by $x$ places iteratively, starting in the first element. If there are not $x$ more elements to the right, it goes back to the start.

For example, if $C=\{1,2,3,4,5\}$, then $\pi(1)$ applied to $C$ is $\{2,3,4,5,1\}$

Now for example, $A=\{1,2,3,4,5,6\}$ then $\pi(4)$ applied to $A=\{5,3,1,5,\dots\}$ so $\pi(4)$ applied to $A$ is $\{5,3,1\}$.

Now consider the set $Y=\{1,2,\dots,n\}$, $n\ge3$. How many $x$'s there are such that $\pi(x)$ applied to $Y$ doesn't not have the elements $1,2,3$ at the same time and are not repeated sequences?

What I mean by repeated sequences:

$C=\{1,2,3,4,5\}$ , $\pi(1) = \pi(6)$, so it's counted as 1.

Answer: 
The story would be like(*any resemblance to reality is pure coincidence*) :  

Suppose you want to build a committee of $n$ mathematicians. You have a pool of $n$ graduate students and $m$ full professors. The rule is that you have to double vote the graduate students. That means, first you choose the graduate students(first filter) and then you choose from the pool of professors and selected graduate students(second filter).  

The LHS is you choose $r$ graduate students and then you choose from $m+r$ candidates, the $n$ mathematicians.  

The right hand side is you choose the amount of professors that are going to be in the final committee, say $r,$ in $\binom{m}{r}$ and so there should be $n-r$ graduate students. You choose them in $\binom{n}{n-r}$ but notice that the remaining $r$ graduate students, perhaps, pass the first filter so you are going to mark the ones that pass the first filter, you can do that in $2^r$ ways.  

This should be reminescent of the proof of $\binom{a}{b}\binom{b}{c}=\binom{a}{c}\binom{a-c}{b-c}.$
Using coefficient extractors we get for the LHS

$$\sum\_{r=0}^n {n\choose r} {m+r\choose n}
= [z^n] (1+z)^m \sum\_{r=0}^n {n\choose r} (1+z)^r
= [z^n] (1+z)^m (2+z)^n.$$

We get for the RHS

$$\sum\_{r=0}^n {n\choose r} {m\choose r} 2^r
= \sum\_{r=0}^n {n\choose r} {m\choose m-r} 2^r
\\ = [z^m] (1+z)^m \sum\_{r=0}^n {n\choose r} 2^r z^r
= [z^m] (1+z)^m (1+2z)^n.$$

This last term is

$$\mathrm{Res}\_{z=0} \frac{1}{z^{m+1}} (1+z)^m (1+2z)^n.$$

There is no pole other than the one at zero and residues sum to zero so
this is

$$-\mathrm{Res}\_{z=\infty} \frac{1}{z^{m+1}} (1+z)^m (1+2z)^n
\\ = \mathrm{Res}\_{z=0} \frac{1}{z^2}
z^{m+1} \frac{(1+z)^m}{z^m} \frac{(2+z)^n}{z^n}
\\ = \mathrm{Res}\_{z=0} \frac{1}{z^{n+1}} (1+z)^m (2+z)^n
= [z^n] (1+z)^m (2+z)^n.$$

This is the claim.