Find the value of $\lfloor (\sqrt{21}+\sqrt{29})^{1984}\rfloor \mod 100$ My question is to find the value of $$\lfloor (\sqrt{21}+\sqrt{29})^{1984}\rfloor \mod 100$$
Mathematica told me the result is 71 and $$\lfloor (\sqrt{21}+\sqrt{29})^{20k+4}\rfloor \mod 100$$ is always 71 for $k\in \mathbb N$, can anyone explain the result?

Let $\alpha = (\sqrt{21}+\sqrt{29})^{2} = 50 + 2 \sqrt{609}$. Then $\alpha^n = x_n + y_n \sqrt{609}$ with $x_n, y_n \in \mathbb Z$.
Let $\beta = (\sqrt{21}-\sqrt{29})^{2} = 50 - 2 \sqrt{609}$. Then $\beta^n = x_n + y_n \sqrt{609}$ and so $\alpha^n+\beta^n = 2x_n \in \mathbb Z$.
Since $0 < \beta < 1$, we get $\lfloor \alpha^n \rfloor = 2x_n-1$.
Since $\alpha^2 = 100 \alpha -64$, we get $x_{n+2} = 100 x_{n+1} - 64 x_n$, with $x_0=1$ and $x_1=50$.
Let $z_n = x_n \bmod 100$. Then $z_{n+2} \equiv 36 z_n \bmod 100$ and so $z_{2n} \equiv 36^n \bmod 100$.
Now, $(\sqrt{21}+\sqrt{29})^{1984} = \alpha^{992}$ and so $z_{992} \equiv 36^{496} \bmod 100$.
Finally, $36^n \bmod 100$ is a pre-periodic sequence of period $5$ starting at $n=1$:
$$
1,36,96,56,16,76,36,96,56,16,76,\dots
$$
that is, $36^{n+5} \equiv 36^n \bmod 100$ for $n\ge 1$. In particular, $36^{5n+1} \equiv 36 \bmod 100$ for all $n$.
Since $496 =5 \cdot 99 + 1$, we get $36^{496} \equiv 36 \bmod 100$.
Therefore, $\lfloor (\sqrt{21}+\sqrt{29})^{1984}\rfloor = 2x_{992}-1 \equiv 2z_{992}-1 \equiv 2 \cdot 36 -1 = 71\bmod 100$.
