TITLE: Is it possible to find an integer, $n$, so that $n^2 + 2$ is divisible by $5$?
QUESTION [0 upvotes]: I’ve been given this question on a problem set. And I searched it up and I saw something that was similar to my question that said
$$
\textit{Imagine a row of dots and columns}
$$
and it made me even more confused. Any ideas?

REPLY [3 votes]: It's not possible.  Any $n$ is $5k, 5k\pm1$, or $5k\pm2$.
If $n=5k$ then $n^2+2=25k^2+2=5(5k^2)+2$ leaves remainder $2$ when divided by $5$.
If $n=5k\pm1$ then $n^2+2=25k^2\pm10k+1+2=5(5k^2\pm2k)+3$ leaves remainder $3$.
If $n=5k\pm2$ then $n^2+2=25k^2\pm20k+4+2=5(5k^2\pm4k+1)+1$ leaves remainder $1$.

REPLY [0 votes]: Observe the following table, where each column is the ones digit of an integer $n$.
\begin{array}{|c|c|c|}
\hline n & n^2 & n^2 + 2 \\
\hline 0 & 0 & 2 \\
1 & 1 & 3 \\
2 & 4 & 6 \\
3 & 9 & 1 \\
4 & 6 & 8 \\
5 & 5 & 7 \\
6 & 6 & 8 \\
7 & 9 & 1 \\
8 & 4 & 6 \\
9 & 1 & 3 \\
\hline
\end{array}
Since the column $n^2+2$ does not contain any $0$s or $5$s, therefore there are no numbers in the form $n^2+2$ that are divisible by $5$ as that is the requirement for divisibility by $5$.
{"set_name": "stack_exchange", "score": 0, "question_id": 3465941}