Given an odd integer $a$ , establish that $a^2+(a+2)^2+(a+4)^2+1$ is divisible by $12$?

Given an odd integer $a$ , establish that $a^2+(a+2)^2+(a+4)^2+1$ is divisible by $12$?

So far I have:

$a^2+(a+2)^2+(a+4)^2+1$

$=a^2+a^2+4a+4+a^2+8a+16+1$

$=3a^2+12a+21$

$=3(a^2+4a+7)$

where do I go from here.. the solution I have is divisible by $3$ not $12$...

-
Use that $a$ is odd to see divisibility by $4$. –  Daniel Fischer Feb 11 at 1:56
how should I go about rewritting a? –  Lil Feb 11 at 2:00
$a = 2k+1$ is the standard way. –  Daniel Fischer Feb 11 at 2:00
all odd integers are always written like that? –  Lil Feb 11 at 2:01
Sometimes one writes $2k-1$, occasionally, that is more convenient. –  Daniel Fischer Feb 11 at 2:02

If $a$ is odd, then $a = 2b+1$ for some integer $b$.

Then $a^2 + 4a + 7 = 4b^2 + 4b + 1 + 8b + 4 + 7 = 4(b^2 + 3b + 3)$, which is evenly divisible by $4$.

Combine this with the divisibility by $3$ that you already have, and you're done.

-

Write $a = 2t+1$. Then $a^2+(a+2)^2+(a+4)^2+1=12 (t^2+3 t+3)$.

It may be simpler to write $b=a+2$. Then $a^2+(a+2)^2+(a+4)^2+1=(b-2)^2+b^2+(b+2)^2+1=3b^2+9$. Now $a$ odd implies $b$ odd, and so write $b=2u+1$. Then $3b^2+9=12 (u^2+u+1)$.

-

Hint:

If $a$ is odd then by the Division algorithm $a = 2k + 1$ for some integer $k$.

-
$$a^2+(a+2)^2+(a+4)^2+1=3a^2+12a+21\equiv3(a^2-1)\pmod{12}$$
Now, if $a$ is odd $a\pm1$ are even $\implies a^2-1$ will be divisible by $4$
In fact, $\displaystyle(2b+1)^2=4b^2+4b+1=8\frac{b(b+1)}2+1\equiv1\pmod8$