prove that $\frac{n^2-1}{8}$ is an even integer if and only if $n \equiv 1\pmod 8$ or $n \equiv -1\pmod 8$ prove that $\frac{n^2-1}{8}$ is an even integer if and only if $n \equiv 1\pmod 8$ or $n \equiv -1\pmod 8$
so I know from what i've already solved that $8|n^2-1$
where can I go from here? any help would be greatly appreciated
 A: Given that $8|n^2-1$ and to prove that if $8|n^2-1$ holds, then $16|n^2-1$ iff $n\equiv \pm 1 \pmod8$
PROOF:
Consider that $8|n^2-1 \Rightarrow 8|(n-1)(n+1)$ 
So $n-1$ and $n+1$ must be consecutive even numbers.
Then either $n-1$ or $n+1$ must be a multiple of $4$.
Now if $16|n^2-1  \Rightarrow 16|(n-1)(n+1)$, then both $n-1$ and $n+1$ cannot be multiples of $4$ since consecutive even numbers cannot be both multiples of $4$.
At most one of them will be a multiple of 8.
So either $$n-1 \equiv 0 \pmod 8$$ or $$n+1 \equiv 0 \pmod 8$$
Combining the two, we get the required condition: $$n\equiv \pm 1 \pmod8$$
A: If $n\equiv\pm1\pmod 8$ then:
$$
\frac{n^2-1}{8}=\frac{{(8k\pm1)}^2-1}{8}=\frac{64k^2\pm16k}{8}=8k^2
\pm2k$$
and it is obvious that $8k^2\pm2k$ is even.
A: Clearly, $n$ is odd, else $n^2-1$ is odd $\implies\dfrac{n^2-1}8$ is not an integer
WLOG $n=4m\pm1$ where $m$ is any integer
$\dfrac{(4m\pm1)^2-2}8=2m^2\pm m\equiv m\pmod2$
Clearly, $\dfrac{(4m\pm1)^2-2}8$ will be even $\iff m\equiv0\pmod2$
