How do I prove that $\dfrac{(7+\sqrt{48})^n+(7-\sqrt{48})^n}{2}\equiv3\pmod4$ if and only if $n$ is odd?
I know that it will always be whole, and that it will never be $\equiv3$ if $n$ is even. But I want to know how to prove that it will always be $\equiv3$ if $n$ is odd...
Expand both the terms using binomial expansion. Following are the steps
$$\frac{ (7+\sqrt{48})^n + (7-\sqrt{48})^n}{2}$$
$$\frac{(7^n+7^{n-1}*\sqrt{48}+...\sqrt{48}^n)+(7^n-7^{n-1}*\sqrt{48}+...-\sqrt{48}^n)}{2}$$
It is seen terms having odd power of $\sqrt{48}$ get cancelled. Left are even powers ( which get doubled ).
$$\frac{2*(7^n+7^{n-2}*\sqrt{48}^2+...+7*\sqrt{48}^{n-1})}{2}$$
The two gets cancelled. All even powers of $\sqrt{48}^{2k}$ make it $48^k$. Now $48$ is divisible by 4. Thus only term left is $7^n$, which is $3 \mod{4}$ when $n$ is odd ( as $7 \equiv 3 \mod{4}$, $7^2 \equiv 1 \mod{ 4}$, $7^3 \equiv 3 \mod {4}$ and so on ).