Prove that if $n$ is a product of two consecutive integers, its units digits must be $0,2,$ or $6$.

I'm having a hard time with the $0,2,6$ and part but here is what I have so far.

Since $n$ is the product of two consecutive integers then one must be odd and the other must be even.

Let $m=2k+1$ represent the odd integer where $k \in \mathbb{Z}$, and let $q=2k$ represent the even integer where $k \in \mathbb{Z}$. Then $$n=m \times q=(2k+1)(2k)=(2k)^2+2k$$

This tells me that $n$ is even. So how can I show that units digit must be $0,2,$ or $6$?


When you multiply two numbers, the units place of the product is determined only by the units' places of the two numbers. So it is sufficient to check the cases one by one. $$ 0 \times 1 \text{ gives } 0 \\ 1 \times 2 \text{ gives } 2\\ 2 \times 3 \text{ gives } 6\\ 3 \times 4 \text{ gives } 2\\ 4 \times 5 \text{ gives } 0\\ 5 \times 6 \text{ gives } 0\\ 6 \times 7 \text{ gives } 2\\ 7 \times 8 \text{ gives } 6\\ 8 \times 9 \text{ gives } 2\\ 9 \times 0 \text{ gives } 0\\ $$

  • 2
    $\begingroup$ Note you only need to do this modulo 5 since we already know $n$ is even. $\endgroup$ – jgon May 3 '15 at 6:17
  • 1
    $\begingroup$ Yes, the first five lines mirror the next five $\endgroup$ – shardulc May 3 '15 at 6:20
  • $\begingroup$ @jgon, I'm not sure but if n is even how does that imply we only need to do this modulo 5. I mean, i see the pattern from above and that it repeats every 5 but how does n being even play a role? $\endgroup$ – Emmie May 3 '15 at 6:34
  • 1
    $\begingroup$ @Emmie Well you're interested in the last digit, which is $n \pmod{10}$, but then by the Chinese Remainder Theorem, that is determined by $n \pmod{2}$ and $n\pmod{5}$. Since we already know that $n$ is even, or $n\equiv 0 \pmod{2}$, we just need to know what $n$ can look like modulo 5. $\endgroup$ – jgon May 3 '15 at 6:37
  • 1
    $\begingroup$ Another way to think about it is that $5 \equiv -5$, $4\equiv -6$, $3\equiv -7$, etc. modulo 10. So we get, for example, $3\times 4\equiv 7\times 6$ $\endgroup$ – shardulc May 3 '15 at 14:02

You can also work over all the cases of $k$ modulo $5$.

  • If $k=5t$, then $$(2(5t))^2+2(5t)=100t^2+10t=10(10t^2+t)$$ so our number ends with a $0$.

  • If $k=5t+1$, then $$(2(5t+1))^2+2(5t+1)=100t^2+40t+4+10t+2=10(10t^2+5t)+6$$ so our number ends with a $6$.

  • If $k=5t+2$, then $$(2(5t+2))^2+2(5t+2)=100t^2+80t+16+10t+4=10(10t^2+9t+20)$$ so our number ends with a $0$.

  • If $k=5t+3$, then $$(2(5t+3))^2+2(5t+3)=100t^2+120t+36+10t+6=10(10t^2+13t+40)+2$$ so our number ends with a $2$.

  • If $k=5t+4$, then $$(2(5t+4))^2+2(5t+4)=100t^2+160t+64+10t+8=10(10t^2+17t+70)+2$$ so our number ends with a $2$.


As has already been pointed out, we can find all the information we need by looking at $\mathbb{Z}/5\mathbb{Z}$. A simple check yields that $$\overline{0}\cdot\overline{1}=\overline{0}$$ $$\overline{1}\cdot\overline{2}=\overline{2}$$ $$\overline{2}\cdot\overline{3}=\overline{1}$$ $$\overline{3}\cdot\overline{4}=\overline{2}$$ $$\overline{4}\cdot\overline{0}=\overline{0}$$ Since the only other remainder in possible for $\overline{2}$ is odd, we needn't check it, but a quick check of $3\times 2$ yields that we actually mean $6$. The group is cyclic and we're therefore done.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.