Let $a$ be an integer that is not divisible by either $2$ or $3$. Prove that $a^2 − 1$ is divisible by $24$. Let $a$ be an integer that is not divisible by either $2$ or $3$. Prove that $a^2 − 1$ is divisible by $24$.

I'm using congruence for this. An idea is to use the division algorithm to get some  more useful value for $a$. That is, $a$ equals either $6k+1$ or $6k+5$, because it is not divisible by either 2 or 3 (so, e.g., we can't have $a=6k+2$ since that is divisible by 2, etc...)
The next step would be to square this and use the properties of congruence arithmetics to should that the remainder of $(a^2 − 1)/24$ is $0$. 
My problem is I'm not making much progress when I substitute  $a=6k+1$ or $6k+5$ into $a^2 − 1$. 
Any help? Thanks.

Just see that
$
(6k \pm 1)^2 - 1 = 36k^2 \pm 12k = 24k^2 + 12k(k \pm 1)
$.
