Let $$S_n = \left \lfloor\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}\right\rfloor-1$$ ($n=0, 1, 2, \ldots$). Prove that $S_n$ is a perfect square.
In Art of Problem Solving website, there is a hint $$ \begin{align} \left\lfloor\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}\right\rfloor-1 & =\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}+\left(\frac{1-\sqrt{5}}{2}\right)^{4n+2}-2\\ &=\left(\left(\frac{1+\sqrt{5}}{2}\right)^{2n+1}+\left(\frac{1-\sqrt{5}}{2}\right)^{2n+1}\right)^2 \end{align} $$
I don't know how to get the first equal sign, is it mean $$ \left\lfloor\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}\right\rfloor = \left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}-\left\{\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2}\right\} $$
But how to prove the decimal part of $\phi^{4n+2}$ $$ \left\{\left(\frac{1+\sqrt{5}}{2}\right)^{4n+2} \right\} =1-\left(\frac{1-\sqrt{5}}{2}\right)^{4n+2}$$
By considering the binomial expansions of $\left(\frac{1+\sqrt5}2\right)^{4n+2}$ and $\left(\frac{1-\sqrt5}2\right)^{4n+2}$ it can be all non-integer terms cancel out when the two are added together, giving an integer result. Therefore we can say that $$\left(\frac{1+\sqrt5}2\right)^{4n+2}+\left(\frac{1-\sqrt5}2\right)^{4n+2}\in\mathbb{Z}$$ However, since $\left|\frac{1-\sqrt5}2\right|<1$, $\left|\left(\frac{1-\sqrt5}2\right)^{4n+2}\right|<1$. Since the exponent of $\frac{1-\sqrt5}2$ is even, $\left(\frac{1-\sqrt5}2\right)^{4n+2}>0$. Therefore, $$\left(\frac{1+\sqrt5}2\right)^{4n+2}+\left(\frac{1-\sqrt5}2\right)^{4n+2}=\left\lceil\left(\frac{1+\sqrt5}2\right)^{4n+2}\right\rceil$$ If $m\notin\mathbb{Z}, \lceil m\rceil=\lfloor m\rfloor+1$. $$\therefore\left(\frac{1+\sqrt5}2\right)^{4n+2}+\left(\frac{1-\sqrt5}2\right)^{4n+2}-1=\left\lceil\left(\frac{1+\sqrt5}2\right)^{4n+2}\right\rceil-1=\left\lfloor\left(\frac{1+\sqrt5}2\right)^{4n+2}\right\rfloor,$$ as required.