Prove the modulo 12 pattern of $400*k^2 + 100k + 3$

Consider the formula $$400*k^2 + 100k + 3$$ where k are whole positive integers.

The outcome of the modulo 12 values of x respectively seems to be: 11, 3, 3, 11, 3, 3 etc.

This question comes up while trying to prove some specific propery of odd triangular numbers on my own. I specifically need to prove that the outcome modulo 12 is never equal to 1.

• That's easy : you can add and multiply modulo $12$, so if you know $k$ modulo $12$ you also know $(400k^2+100k+3)$ modulo $12$. Therefore, there are only $12$ cases to check. – Ewan Delanoy Apr 20 at 12:15
• @EwanDelanoy I'm sorry but I am extremely unfamiliar with modular arithmetic; could you demonstrate this a little more? – Tim Greven Apr 20 at 12:16
• @EwanDelanoy so if the pattern holds for the first 12 numbers, it must hold forever? – Tim Greven Apr 20 at 12:19
• Exactly. Look at what happens for $0,1,2,\ldots,11$ ; then the behavior for $12$ will be the same as the one for $0$, the behavior for $13$ will be the same as the one for $1$, etc. – Ewan Delanoy Apr 20 at 12:22

Suppose that $$400k^2+100k+3 \equiv 1 \ ({\sf mod} \ 12)$$. Then $$400k^2+100k+2 \equiv 0 \ ({\sf mod} \ 12)$$, or $$200k^2+50k+1 \equiv 0 \ ({\sf mod} \ 6)$$, which means that the odd number $$200k^2+50k+1$$ is a multiple of $$6$$ which is impossible.
$$\!\bmod 4\!:\ a_k = 400k^2\!+\!100k\!+\!3\equiv\color{#c00}{3},\,$$ but $$\bmod 12\!:\ a_k\equiv 1\,\Rightarrow \bmod 4\!:\ a_k\equiv\color{#c00}{ 1},\,$$ contradiction.
Remark $$\$$ We can also show $$\bmod 12\!:\ a_k\equiv 3,11\,$$ as you observed, namely
$$\!\bmod 12\!:\,\ a_k \equiv 4k^2\!+\!4k\!+\!3\equiv 3,11\iff a_k+1 \equiv 4(k^2\!+\!k\!+\!1)\equiv 4,12$$
\begin{align}\bmod 3\!:\ k\equiv 0,2\,&\Rightarrow\, k^2\!+\!k\!+\!1\equiv 1\ \Rightarrow\,\bmod 12\!:\ a_k+1\equiv 4\,\Rightarrow\, a_k\equiv\ \ 3\\ \bmod 3\!:\ k\equiv 1\ \ \ \ \,& \Rightarrow\ k^2\!+\!k\!+\!1\equiv 0\,\Rightarrow\,\bmod 12\!:\ a_k+1\equiv 0\,\Rightarrow\,a_k\equiv -1\end{align}