a divisibility problem if $a$ is an integer , such that it is not divisible by 2 or 3, prove that $ 24 $ divides $ a^2+ 23$ . 
I took cases ,case $1$ : when $a$ is divisible by only $2$ and not $3$ then we can write  $a = 6k+2, 6k+4 $ and case 2: when $a= 6k+3$ and here $a$ is divisible by only $3$ and not $2$. 
and then in each case,    
I substituted values of $a$ in $a^2+23$ , but got nothing. I do think my case by- case analysis here is wrong, but surely I'm missing something .
please help by suggesting how can I improve my solution. No need to give me an elegant solution, only a few hints will be fine.

Method $1:$
HINT:
Using Carmichael Function, $\lambda(24)=2$
If $(a,2)=(a,3)=1, (a,2^m\cdot3^n)=1$ for any integer $m\ge0,n\ge0$
So, $a^2\equiv1\pmod{24}$ if $(a,24)=1$
Now, $a^2+23\equiv a^2-1\pmod{24}$
Method $2:$ 
If $(a,3)=1, a\equiv\pm1\pmod 3$
$\implies a^2\equiv1\pmod 3\implies a^2+23\equiv24\pmod{3}\equiv0$
If $(a,2)=1, a=2b+1$(say),
$a^2=(2b+1)^2=8\frac{b(b+1)}2+1\equiv1\pmod 8$
$\implies a^2+23\equiv1+23\pmod 8\equiv 0$
So, $a^2+23$ is divisible by $3,8$ so will be divisible by lcm$(3,8)=24$
Method $3:$
HINT:
$$a^2+23=(a-1)(a+1)+24$$
Observe that $(a-1)a(a+1)$ being a product of $3$ three consecutive integers must be divisible by $3$
But as $(a,3)=1\implies 3$ divides $(a-1)(a+1)$
Again, as $(a,2)=1, a\pm1$ are even, one of them will be divisible by $2$, the other by $4$
$\implies 2\cdot4$ divides  $(a-1)(a+1)$
So, $(a-1)(a+1)$ is divisible by lcm$(3,8)=24$
