<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] If $n$ is even then $n^2+15n$ is even.  If $n$ is odd, then $n^2+15n$ is still even.  So $n^2+15n+122$ is even for every $n$.
So we just need to determine when the expression is divisible by $3$.
$$n^2+15n+122 \equiv n^2 +2 \pmod{3}.$$
It's easy to check that $n=1$ and $n=2$ are the only solutions.  So the answer is "all non multiples of $3$".  There are $8$ multiples of $3$ between $1$ and $25$, so the final number is $25-8 = 17.$
</s>