<s>[INST] Find numbers divisible by 6 Find the number of all $n$, $1 \leq n \leq 25$ such that $n^2+15n+122$ is divisible by 6.
My attempt. We know that:
\begin{align*}
n^2+15n+122 & \equiv n^2+3n+2 \pmod{6}
\end{align*}
But $n^2+3n+2=(n+1)(n+2)$, then $n^2+15n+122 \equiv (n+1)(n+2) \pmod{6}$, now we have
\begin{align*}
n(n^2+15n+122) & \equiv n(n+1)(n+2)\pmod{6} \\
n^3+15n^2+122n & \equiv 0 \pmod{6}
\end{align*}
I have done this and I think I have complicated the problem even more.
 [/INST] You were almost there with your first line. You have $n^2+3n+2=(n+1)(n+2)\text{ mod 6}$
$(n+1)$ and $(n+2)$ are two consecutive numbers so one of them is even. That gives you that this polynomial is divisible by $2$ for all $n$.
If $n$ is either congruent to $1$ or $2$ mod $3$ then $(n+2)$ or $(n+1)$, respectively, is divisible by $3$. Therefore all non-multiples of $3$ are solutions to this problem.
</s>