<s>[INST] Why does the difference equation $x_nx_{n+2}=w^5x_n-(w^2+w^3)x_{n+1}+x_{n+2}$ generate cyclic sequences? Let $w$ be a primitive 5th root of unity. Then the difference equation  $$x_nx_{n+2}=x_n-(w^2+w^3)x_{n+1}+x_{n+2}$$ generates a cycle of period 5 for general initial values:
$$u,v,\frac{u-(w^2+w^3)v}{u-1},\frac{uv-(w^2+w^3)(u+v)}{(u-1)(v-1)},\frac{v-(w^2+w^3)u}{v-1},u,v, ...$$ 
For equations of the form $$x_nx_{n+2}=w^{a+b}x_n-(w^a+w^b)x_{n+1}+x_{n+2},\text{ for }w^a+w^b\ne 0$$ with the same globally periodic property, I can show that the only possible periods are 5,8,12,18 and 30.
Curiously, the 'same' equation works for all these periods: 
$$x_nx_{n+2}=w^5x_n-(w^2+w^3)x_{n+1}+x_{n+2},$$
where $w$ is a primitive $p$th root of unity for $p=5,8,12,18,30$. Is this a fluke or is there a way of seeing why this 'family' of equations always generate cycles?  
 [/INST] Let us prove that for all nonzero $a,b\in \mathbb{C}$ the difference equation  $$x_nx_{n+2}=ax_n+bx_{n+1}+x_{n+2}$$
never generates a cycle of length $8$.
Let us denote $u=x_0, y=x_1$. 
Suppose the contrary. We know that 
$$x_{n+2}=\frac{ax_n+bx_{n+1}}{x_n-1}, x_{n-1}=\frac{bx_n+x_{n+1}}{x_{n+1}-a},$$
so for every integer $k$ we can represent $x_k$ as rational function in variables $u,v$:
$$x_k=\frac{P_{k}(u,v)}{Q_k(u,v)}.$$
If the equality $x_{-4}=x_4$ is true then $P_{-4}(u,v)Q_{4}(u,v)=P_{4}(u,v)Q_{-4}(u,v)$.
Calculations in Wolfram Mathematica gives the next result for the left side

and for the right side

Looking at some coefficients at $u^iv^j$ we get 
$$[u^0v^1]: 2a^2b-ab^3=-2a^6b+a^5b^3,$$
$$[u^1v^1]: -a^7+a^6b^2=-a^3+3a^2b^2-ab^4,$$
$$[u^3v^2]: b-ab+b^2-ab^2=-a^2b+a^3b-ab^2+a^2b^2.$$
These equations after excluding some terms turn into (we remember that $a,b\not =0$:
$$ (a^4+1)(2a-b^2)=0, \tag{1}$$
$$[u^1v^1]: b^4+(a^5-3a)b^2+a^2-a^6=0, \tag{2}$$
$$[u^3v^2]: (a-1)(b(a+1)+a^2+1)=0. \tag{3}$$
If $a=1$, then from $(1)$ we have that $b^2=2$. In this case we have 
$$P_{-4}(u,v)Q_{4}(u,v)-P_{4}(u,v)Q_{-4}(u,v)\not =0,$$ as it equals to

So $a\not =1$, and equation $(3)$ gives us $a\not =-1$ and the next relationship
$$b=-\frac{a^2+1}{a+1}. \tag{4}$$
Let us consider the equation $(1)$ and suppose that $b^2=2a$. Then from $(2)$ we have that $a^2-a^6=0$. As $a\not =0,\pm 1$ then $a=\pm i$. But in that case $a=\pm i$, so $b=0$ by $(4)$, contradiction with our assumption.
Hence $a^4+1=0$, so for some odd $k$ we have 
$$a=e^{ik\pi/4}=\frac{\pm 1 \pm i}{\sqrt{2}}. \tag{5}$$
Joining together $b^2=2a$ and equation $(4)$ we have that $a$ is also a root of polynomial $x^4-2x^3-2x^3-2x+1$ but that's not true, so we get final contradiction.
</s>