Prove that $24|n^2-1$, if $(n,6)=1$ $n^2-1 = (n-1)(n+1)$
Then $24|(n-1)(n+1)$
$(n,6)=1$: $\exists a,b\in\mathbb{Z}$ that $n = 6\cdot a+b$
Investigate the residues, which arise when dividing the number n by two and three:
$\frac{6\cdot a+b}{3} = \frac{6\cdot a}{3}+\frac{b}{3} = 2\cdot a+\frac{b}{3}$
$\frac{6\cdot a+b}{2} = 3\cdot a+\frac{b}{2}$
Is this correct? How to prove it using resiudes? 
Thank You.

Note that $\gcd(n,6)=1 \implies n = 6 a + 1$ or $n=6a+5$, where $a \in \mathbb{Z}$. 
For $n=6a+1$,
$$(n-1)(n+1) = 12a(3a+1).$$
Since $a(3a+1)$ is always even, i.e., $a(3a+1)=2k$, $(n-1)(n+1) = 24k$. 
Similar is the case for $n = 6a+5$.
