# Suppose that n is an integer such that 5|(n + 2)

Suppose that n is an integer such that $$5|(n + 2)$$. Which of the following are divisible by $$5$$?

$$n^2 - 4$$, $$n^2 + 8n + 7$$, $$n^4 - 1$$, $$n^2 - 2n$$

• Commented Dec 2, 2019 at 8:45
• Your own thoughts? Commented Dec 2, 2019 at 8:47
• 5|(8^2 - 4) = 5|(6^4 - 4) = 5|(60), 5|(8^2 + (8x8) + 7) = 5|(64 + 64 + 7) = 5|(135), 5|(8^4 - 1) = 5|(4096 - 1) = 5|(4095), 5|(8^2 - (2x8)) = 5|(64 - 16) = 5|(48) Commented Dec 2, 2019 at 8:51
• all but the last Commented Dec 2, 2019 at 8:56
• Any pointers on how I should explain this? Commented Dec 2, 2019 at 8:59

$$n+2 \equiv 0 \pmod 5 \implies n \equiv -2 \pmod 5$$.

Factoring all the expressions makes it easier, even though it is not strictly necessary.

The first one is shown as an example:

$$n^2 - 4 = (n+2)(n-2) \equiv (0)(-4) = 0 \pmod 5$$, so it is divisible by $$5$$.

Working this way, you'll find every single one has a factor that is $$0$$ or a multiple of $$5$$ (which is equivalent to $$0 \pmod 5$$) except for the last one.

So the answer is all except the last, namely $$n^2 - 2n = n(n-2)$$.

Here is an approach without explicit modular arithmetic, just basic algebra.

$$5|(n + 2)$$ means $$\dfrac{(n+2)}{5} = k$$ where $$k$$ is an integer. Therefore:

$$5|(n + 2) \implies \dfrac{(n+2)}{5} = k \implies (n+2) = 5k \qquad k \in \mathbb{Z}$$

In other words, this means that we can replace $$(n+2)$$ with $$5k$$.

Now, recall that any number that can be written as a multiple of $$5$$ is itself divisible by $$5$$. Therefore, your goal is to rewrite the expressions in such a way that you have the $$n+2$$ terms isolated.

For instance, look at the first expression in the list. Using factorisation, you get the following:

$$n^2 - 4 = (n+2)(n-2)$$

Now, there is an isolated $$(n+2)$$ term. Therefore, we can replace it with $$5k$$ as explained. This gives:

$$n^2 - 4 = (n+2)(n-2) = 5k(n-2)= 5\cdot k(n-2)$$

From here it should be clear that the resultant expression is a multiple of $$5$$ therefore, it is divisible by 5.

Perform similar manipulations to the rest of the expressions and make deductions based on the transformed expression.

Expression $$2$$

$$n^2 + 8n + 7 = (n+1)(n+7) = (n+1)({n+2}+5) = (n+1)(\color{red}{n+2}+5)$$ We have isolated the $$(n+2)$$ term so we substitute again to get:

$$(n+1)(\color{red}{5k}+5) = (n+1)(5(k+1)) = 5 \cdot (n+1)(k+1)$$

Expression $$3$$

Left as an exercise. Do it to test your understanding.

Expression $$4$$

$$n^2 - 2n = n(n-2) = n(n+2-4) = n(5k-4) = 5kn - 4n$$

Here, the last expression gives a multiple of $$5$$ and a remainder of $$4n$$. Now, based on the given condition, $$4n$$ is not divisible by $$5$$ (Why?). Therefore, the expression will always have a remainder when divided by $$5$$. This implies it is not divisible by $$5$$.

Using module arithmetic: $$5\mid (n+2) \iff n+2\equiv 0\pmod{5} \Rightarrow \\ n\equiv -2\equiv 3\pmod{5}\\ 2n\equiv 6\equiv 1\pmod{5}\\ 8n\equiv 24\equiv 4\pmod{5}\\ n^2\equiv 9\equiv 4\pmod{5}$$ Hence: $$n^2-4\equiv 4-4\equiv 0\pmod{5} \quad \checkmark\\ n^2+8n+7\equiv 4+4+7\equiv 15\equiv 0\pmod{5} \quad \checkmark\\ n^2-1\equiv 4-1\equiv 3\pmod{5} \quad \times\\ n^2-2n\equiv 4-2\equiv 2\pmod{5} \quad \times$$ For example, take $$n=3$$: $$n^2-4=5 \checkmark\\ n^2+8n+7=40\checkmark\\ n^2-1=8 \times\\ n^2-2n=3\times$$

Please avoid asking solutions to problems unless they are research oriented and worthy of Math Stack Exchange Veterans (I'm obviously not one of em lol). Stack Exchange ain't not a place to get specific problems solves. I recommend Art Of Problem Solving for Questions like these.

Rather go for something like: "Approaching Divisibility Problems". "I have a divisibility statement. How do I proceed to find if other expressions involving the same variable follow this divisibility too?"

If I had enough Reputation I'd vote to close your question right now.

If your question was the one I mentioned in the previous paragraph, Then here you go:

Learn Modular Algebra if you have enough time. It deals with divisibility and similar problems. $$n=3mod5$$ If this scares you just take $$n = 5k - 2$$ and proceed.

Don't ask solutions to problems in stackexchange.