Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Studying GCD, I got a question that begs to show that $n$ and $n^5$ has the same units digit ... What would be an idea to be able to initiate such a statement? testing $0$ and $0^5=0$ $1$ and $1^5=1$ $2$ and $2^5=32$

In my studies, I have not got "mod", please use other means, if possible of course.

I demonstrated in a previous period that $$2|n^5-n$$because $$n^5-n=(n+1)n(5n^4+5n+5)$$, and$$5|n^5-n$$By Fermat's Little Theorem

Only I do not understand what should happen to the units of the two numbers are equal ... What must occur?

share|cite|improve this question
Well, $n\equiv n^5\pmod2$ and $n\equiv n^5\pmod5$. – awllower Jul 25 '13 at 14:48
Although not studied'' mod''. Using GCD has no like? – marcelolpjunior Jul 25 '13 at 14:52
Well, mod is gcd, since $a\equiv b\pmod n$ if and only if $\gcd(n,a-b)=n$. – awllower Jul 25 '13 at 14:56
up vote 7 down vote accepted

Without using any modular arithmetic:

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

$(n-2)(n-1)n(n+1)(n+2)$ is the product of 5 consecutive integers thus divisible by 2 and 5.

$5n(n-1)(n+1)$ is multiple of $5$ and even.

share|cite|improve this answer

We know if unit digits of two numbers are same, their difference is divisible by 10 and vice versa.

Method $1a:$

Using Fermat's Little Theorem $n^5-n\equiv0\pmod 5$

and $n^5-n=n(n^4-1)=n(n^2-1)(n^2+1)=n(n-1)(n+1)(n^2+1)$ which is divisible by $n(n-1)$ which is always even

$\implies 2|(n^5-n)$ and we have $5|(n^5-n)$

$\implies n^5-n$ is divisible by lcm $(2,5)=10$

Method $1b:$

As $10=2\cdot5,$

using Fermat's Little Theorem, we have $$n^5-n\equiv0\pmod 5\text{ and } n^2-n\equiv0\pmod 2$$

Now, lcm $(n^5-n,n^2-n)=n(n^4-1,n-1)=n(n^4-1)$ as $(n-1)|(n^4-1)$

$\implies $lcm $(n^5-n,n^2-n)=n^5-n$ which is divisible by $5,2$ hence by lcm$(2,5)=10$

Method $2:$

Alternatively, $$n^5-n=n(n^4-1)=n(n^2-1)(n^2+1)=n(n^2-1)(n^2-4+5)$$ $$=n(n^2-1)(n^2-4)+5n(n^2-1)$$ $$=\underbrace{(n-2)(n-1)n(n+1)(n+2)}_{\text{ product of }5\text{ consecutive integers }}+5\cdot \underbrace{(n-1)n(n+1)}_{\text{ product of }3\text{ consecutive integers }}$$

Now, we know the product $r$ consecutive integers is divisible by $r!$ where $r$ is a positive integer

So, $(n-2)(n-1)n(n+1)(n+2)$ is divisible by $5!=120$ and $(n-1)n(n+1)$ is divisible by $3!=6$

$$\implies n^5-n\equiv0\pmod{30}\equiv0\pmod{10}$$

share|cite|improve this answer
Damn, too fast! – Emily Jul 25 '13 at 14:48
Or $n$ and $n^5$ are both even or both odd ... – Mark Bennet Jul 25 '13 at 14:48
@lab bhattacharjee: Is there another way? Without using mod. – marcelolpjunior Jul 25 '13 at 14:54
@MarkBennet Then either $n$ is of the form $2k$ or $2k +1$ order. Right? – marcelolpjunior Jul 25 '13 at 14:55
@marcelolpjunior, I am adding an alternative solution – lab bhattacharjee Jul 25 '13 at 14:57

The result can be verified using minimal machinery. first note that the units digit of $n^5$ is completely determined by the units digit of $n$.

The units digit of $n^5$ is one of $0,1,2,\dots,9$. We can verify the result for each of the $10$ cases by a direct calculation.

There are $10$ calculations to do, none of them painful. We do one of them. Let $n$ end in $8$. Then $n^2$ ends in $4$, so $n^4$ ends in $6$. Thus $n^5$ ends in $8$.

share|cite|improve this answer

You can write $n=10a+b$, with $b$ the units digit. Then $n^5=(10a)^5+5(10a)^4b+10(10a)^3b^2+10(10a)^2b^3+5(10a)b^4+b^5$. As all the terms but the last have a factor of $10$, the units digit of $n^5$ is the same as the units digit of $b^5$. This justifies testing each units digit to see if the units digit of its fifth power is the same as the digit. Ten tests and you are done-they all succeed.

share|cite|improve this answer
Actually 6 tests are enough, since you can write $n=10a \pm b$ where $b$ is a digit $\leq 5$. – N. S. Jul 25 '13 at 15:08
@N.S.: Good point. – Ross Millikan Jul 25 '13 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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