<s>[INST] Prove that $\lfloor {(\frac{\sqrt{5}+1}{2})}^{4n-2}\rfloor-1$ is a square number where $n$ is a natural number. I found this problem in a junior high school math competition.

Prove that $\lfloor {(\frac{\sqrt{5}+1}{2})}^{4n-2}\rfloor-1$ is a
square number where $n$ is a natural number.

Here's what I think
Suppose $x$ is ${(\frac{\sqrt{5}+1}{2})}^2$
Then we get
$\lfloor {(\frac{\sqrt{5}+1}{2})}^{4n-2}\rfloor-1$
$=(x^{2n-1}+\frac{1}{x^{2n-1}}-1)-1$
$=(x^{2n-1}-1)(1-\frac{1}{x^{2n-1}})$
$=(x-1)(1-\frac{1}{x})(x^{2n-2}+x^{2n-3}+x^{2n-4}+\ldots+1)(1+\frac{1}{x}+\frac{1}{x^2}+\ldots+\frac{1}{x^{2n-2}})$
$=(x^{2n-2}+x^{2n-3}+x^{2n-4}+\ldots+1)(1+\frac{1}{x}+\frac{1}{x^2}+\ldots+\frac{1}{x^{2n-2}})$
$=(x^{n-1}+x^{n-2}+x^{n-3}+\ldots+\frac{1}{x^{n-1}})(x^{n-1}+x^{n-2}+x^{n-3}+\ldots+\frac{1}{x^{n-1}})$
$=(x^{n-1}+x^{n-2}+x^{n-3}+\ldots+\frac{1}{x^{n-1}})^2$
Now I hope to prove that $(x^{n-1}+x^{n-2}+x^{n-3}+\ldots+\frac{1}{x^{n-1}})\in\mathbb{N}$
But I don't know how to continue, but I think there is something with the golden ratio, can someone help me, or provide a better solution for the original problem? Thanks a lot!
NEW: I found the same question on AoPS, I see that the original formula is equal to $((\frac{\sqrt5+1}{2})^{2n-1}-(\frac{\sqrt5-1}{2})^{2n-1})^2$, but it just said that is actually the general form for the recurrence relation $a_n=3a_{n-1}+a_{n-2}$ with $a_0=0$ and $a_1=1$, which can be shown by the characteristic polynomials, but I still don't know why...
 [/INST] Not to be confused with this exceedingly similar question.

I'll reproduce the solution found here (with a few added details).
Because $\frac{\sqrt{5} - 1}{2} < 1$, we also know that $\left(\frac{\sqrt{5} - 1}{2}\right)^{4n - 2} < 1$. Then
$$\begin{align}
\left\lfloor\left(\frac{\sqrt{5} + 1}{2}\right)^{4n - 2}\right\rfloor -1 &= \left(\frac{\sqrt{5} + 1}{2}\right)^{4n - 2} + \left(\frac{\sqrt{5} - 1}{2}\right)^{4n - 2} - 2\\
&= \left(\left(\frac{\sqrt{5} + 1}{2}\right)^{2n - 1}-\left(\frac{\sqrt{5} - 1}{2}\right)^{2n - 1}\right)^2
\end{align}$$
Thus, we only need to show that
$$\left(\frac{\sqrt{5} + 1}{2}\right)^{2n - 1}-\left(\frac{\sqrt{5} - 1}{2}\right)^{2n - 1} \in \mathbb{N}.$$
Using the Newton binomial formula we have
\begin{align}
    \left(\frac{\sqrt{5} + 1}{2}\right)^{2n - 1} &= A_n \sqrt{5} +B_n\\
    \left(\frac{\sqrt{5} - 1}{2}\right)^{2n - 1} &= A_n \sqrt{5} - 
    B_n
\end{align}
so
$$\left(\frac{\sqrt{5}+1}{2}\right)^{2 n-1}-\left(\frac{\sqrt{5}-1}{2}\right)^{2 n-1}=2 B_n$$
where $A_n, B_n$ there are positive integers
Every term in this recurrence is an integer so
$$\left(\frac{\sqrt{5} + 1}{2}\right)^{2n - 1}-\left(\frac{\sqrt{5} - 1}{2}\right)^{2n - 1} \in \mathbb{N}$$
and we are done.
</s>