1 5 2 5 3 5 4 5 = 1 = 3 2 = 2 4 3 = 1 0 2 4
Is it true that the last digit of a whole number and that of its fifth power are always the same (in base 10)?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
In fact, with a slight change to this method, we only need to calculate 1 more fifth power! Because we can use any 10 numbers. We can just look at the negatives! -4 has a last digit of -4=6(mod 10), -3 has last digit -3=7(mod 10), and so on. Then we can calculate 5^5, though it is pretty clear that it is true for 5^5, since 5^n is always equal to 5 mod 10 (n>0).
No need to calculate the 5th power, just keep track of the last digit: 1-1-1-1-1, 2-4-8-6-2, 3-9-7-1-3, 4-6-4-6-4, 5-5-5-5-5, 6-6-6-6-6, 7-9-3-1-7, 8-4-2-6-8, 9-1-9-1-9, 0-0-0-0-0
Log in to reply
Yep, we have the "same" cycles (1,5,6) and the circular ones (2,3,4,7,8,9,0), which cycle exactly at each five times!
Log in to reply
Surely the 'same' cycles are (0,1,5,6). The circular ones can be divided into alternating cycles (4,9) and cycles with a 'length' of four (2,3,7,8).
Also, we don’t even have to go through all the digits. We just have to go through all the prime digits because if a digit isn’t prime, as long as its factors raised to the fifth power all equal themselves, it will stay the same after being raised to the fifth power too. Very good explanation!
Fermat's Little Theorem states that, for any prime number p and integer a , a p ≡ a ( m o d p ) ( ⇔ p ∣ a p − a )
Especially, for p = 2 , a 2 ≡ a ( m o d 2 ) ⟹ a 5 ≡ a ( m o d 2 ) ⟹ 2 ∣ a 5 − a
and for p = 5 , a 5 ≡ a ( m o d 5 ) ⟹ 5 ∣ a 5 − a
Now, by the divisibility rule, for primes p and q , p ∣ n ∧ q ∣ n ⟹ p q ∣ n
2 ∣ a 5 − a ∧ 5 ∣ a 5 − a ⟹ 1 0 ∣ a 5 − a ⟹ a 5 ≡ a ( m o d 1 0 )
which is equivalent to a having the same last digit as a 5 . □
Is it possible to streamline this logic using Euler's generalization?
Log in to reply
Not that easily because a ϕ ( n ) ≡ 1 ( m o d n ) is true iff a , n are coprime.
Can you explain how a 5 ≅ a (mod 2) follows from a 2 ≅ a (mod 2) ?
Log in to reply
a 2 ≡ a ( m o d n ) ⟹ a ⋅ a 2 ≡ a ⋅ a ( m o d n ) ⟹ a 3 ≡ a 2 ( m o d n ) ⟹ a 3 ≡ a ( m o d n ) ⟹ a k ≡ a ( m o d n )
Log in to reply
So… in short, for a^2, increasing the power doesn't change the modulus.. Insightful! I think I get the significance of this result now!
Päivää teille herra Nieminen.
Since a^3 = a implies a^5=a, we also see that 3 | a^5 -a. So the remainder of a^5 and a are the same modulo 30.
how do you read that notation?
Use Fermat's theorem, a 5 is congruent to a(mod 5) and also 5 is odd so congruent to a (mod 10) (and not a+5 or a-5 since 10 is even and so if a is odd then the remainder it leaves on division by 10 is odd,even if a is even,so I can not add or substract 5 from a and hence is congruent to a mod 10 only. )...DONE!!!!
This is proof is not rigorous. You are correctly trying to prove that a 5 ≡ a ( m o d 1 0 ) and using Fermat's Little Theorem you managed to show that a 5 ≡ a ( m o d 5 ) , but you didn't specify, why this implies that a 5 ≡ a ( m o d 1 0 ) .
Log in to reply
See i said 5 is odd so a is congruent to either a or (a+5) or (a-5) (mod 10)....so if a is even then (a+5) or (a-5) will be odd ....so an even number can never leave an odd number on divison by 10...hence it is congruent to a mod 10 only....same way if a is odd....pls see if I have some error...do tell me sir.
Log in to reply
Your logic might be right, but it is difficult to understand immediately. Could you possibly try to state it more clearly?
Log in to reply
@Jesse Nieminen – Ok i will try...thank you
@Jesse Nieminen – edited see if ok now?
Log in to reply
@Rajdeep Brahma – It's better now, good job! However, you don't seem to be that proficient in English which is the main reason why your explanation was difficult to understand. I suggest focusing on trying to improve your English so that people won't have hard time trying to understand what you are trying to explain. I'm nowhere near perfect myself and I am not a native English speaker, but I feel that having my English skills at a level this high is vital for my learning and communication.
Log in to reply
@Jesse Nieminen – ok sir thanks for your suggestion so much...I will definitely try to improve...
a5=a(mod 2), it is evident.
11 is a whole number. 11^5 = 161051
You can express any number as: N = 1 0 n + d ,
with d a single digit number, for example: 4 8 = 1 0 ∗ 4 + 8 and 1 2 3 7 = 1 0 ∗ 1 2 3 + 7 .
You can now compute N 5 using Pascal's Triangle coefficients for the fifth power [1, 5, 10, 10, 5, 1]:
N 5 = ( 1 0 n + d ) 5 = 1 0 5 n 5 + 5 ∗ 1 0 4 n 4 d + 1 0 ∗ 1 0 3 n 3 d 2 + 1 0 ∗ 1 0 2 n 2 d 3 + 5 ∗ 1 0 n d 4 + d 5 =
1 0 ∗ ( 1 0 4 n 5 + 5 ∗ 1 0 3 n 4 d + 1 0 3 n 3 d 2 + 1 0 2 n 2 d 3 + 5 n d 4 ) + d 5
As you can easily see, each member of the polynomial is multiplied by 10 except for the last d 5 , and this means that the last digit of the result depends only from it. So if we compute each fifth power for every possible value of d (from 0 to 9), we can verify that the last digit is the same as d . And since d 5 is the only one that contributes to the last digit in the polynomial, we can confirm that the last digit of every whole number and that of its fifth power are always the same.
Such simple explanation easily understood by most high school students. This one should be on top.
Neat! Even I understood it!
First, every whole number can be written as a sum of two parts, the last digit which we'll call a and the rest including the tens place and up we can call b . For example, 12 can be written as 2 + 1 0 and 123 can be written as 3 + 1 2 0 .
Thus we can write the fifth power any number greater than 9 as a binomal expression: ( a + b ) 5
Expanding this expression obtains: a 5 + 5 a 4 b + 1 0 a 3 b 2 + 1 0 a 2 b 3 + 5 a b 4 + b 5
We know that b is a multiple of 10, so all of the terms in our expansion involving b will end in 0, not affecting our last digit.
The only term that does influence the term is then the only term without b : a 5
Since a is a whole number from 1 to 9, we now only need to prove for whole numbers 1 through 9!
And it's true that the last digit of whole numbers 1 through 9 is the same as the last digit of their fifth powers!
5
5
=
3
1
2
5
6
5
=
7
7
7
6
7
5
=
1
6
8
0
7
8
5
=
3
2
7
6
8
9
5
=
5
9
0
4
9
Therefore, the last digit of a whole number and that of its fifth power are always the same.
Thanks for reading! This is my first attempt at this kind of thing so sorry if its messy, suggestions help!
good solution!(+1)!
All non-negative integers n can be written as n = 1 0 a + b , where a and b are non-negative integers, with b ≤ 9 or the last digit of n . Then we have n 5 ≡ ( 1 0 a + b ) 5 ≡ b 5 (mod 10) . That is to say the last digit of n 5 is equal to the last digit of b 5 or the fifth power of its last digit b .
Case 1 : For b = 1 , 3 , 7 , 9 being a coprime of 10, then Euler's theorem applies.
n 5 ≡ b 5 m o d ϕ ( 1 0 ) (mod 10) ≡ b 5 m o d 4 (mod 10) ≡ b (mod 10) where ϕ ( 1 0 ) is the Euler’s totient function of 10.
Case 2 : For b = 5 , then n 5 ≡ 5 5 ≡ 5 ≡ b (mod 10) , since all powers of 5 end with 5.
Case 3 : For b = 2 , 4 , 6 , 8 multiples of 2. Then n 5 ≡ b 5 ≡ 0 (mod 2) and n 5 ≡ b 5 m o d ϕ ( 5 ) ≡ b 5 m o d 4 ≡ b (mod 5) ⟹ n 5 ≡ 5 m + b , where m is an integer. Then we have
5 m + b m ⟹ n 5 ≡ 0 (mod 2) ≡ 0 (mod 2) ≡ 5 ( 0 ) + b ≡ b (mod 10) Note that b is a multiple of 2.
Therefore the answer is: Yes , for all non-negative n , n 5 ≡ b (mod 10) , where b is the last (unit) digit of n .
If a number's last digit is x it can be written in the form: A + x , where A is multiple of 10 (since its last digit is 0) and can be written in the form : 1 0 × a (where a is an integer).
Then, if the last digit of ( A + x ) 5 is x, then the last digit of ( A + x ) 5 − x is 0, therefore it’s a multiple of 10.
( A + x ) 5 − x = ( 1 0 a + x ) 5 − x = ( 1 0 a ) 5 + 5 × ( 1 0 a ) 4 × x + 1 0 × ( 1 0 a ) 3 × x 2 + 1 0 × ( 1 0 a ) 2 × x 3 + 5 × ( 1 0 a ) × x 4 + x 5 − x
Let’s take only x 5 − x :
x 5 − x = x ( x 4 − 1 ) = x × ( x 2 + 1 ) × ( x 2 − 1 ) = x × ( x 2 + 1 ) × ( x + 1 ) × ( x − 1 )
Now we can see that x 5 − x is a multiple of 2 since it’s a multiple of adjecent numbers ( x − 1 , x , x + 1 ). We can also see that x 5 − x is a multiple of 5 since, no matter what x m o d 5 is, at least one factor of x × ( x 2 + 1 ) × ( x + 1 ) × ( x − 1 ) is a multiple of 5.
For these reasons x 5 − x is always a multiple of 10, so each term in ( 1 0 a ) 5 + 5 × ( 1 0 a ) 4 × x + 1 0 × ( 1 0 a ) 3 × x 2 + 1 0 × ( 1 0 a ) 2 × x 3 + 5 × ( 1 0 a ) × x 4 + x 5 − x is a multiple of 10, which makes ( A + x ) 5 − x a multiple of 10.
This means that the last digit of ( A + x ) 5 is always x .
If n ≡ n 5 ( m o d 1 0 ) , then n 5 − n = n ( n − 1 ) ( n + 1 ) ( n 2 + 1 ) ≡ 0 ( m o d 1 0 ) . One of n and n + 1 must be even, so the product must be divisible by 2 . In addition, the product will be divisible by 5 if:
n ≡ 0 ( m o d 5 ) n − 1 ≡ 0 ( m o d 5 ) ⟹ n ≡ 1 ( m o d 5 ) n + 1 ≡ 0 ( m o d 5 ) ⟹ n ≡ 4 ( m o d 5 )
And if n is congruent to 2 or 3 modulo 5 , then n 2 + 1 must be divisible by 5 . Therefore the product must be divisible by 2 and 5 , so it is divisible by 1 0 .
This is quite a tidy solution that doesn't require knowledge of Fermat's theorems.
The expression n k ( m o d 1 0 ) is periodic over k for all digits n . The digits n have fundamental periods of 1,2, and 4, hence all have periods 4 hence n ≡ n 5 ( m o d 1 0 )
pls explain what u meant by periodic...I didn't get..
Log in to reply
A function is periodic if for all x, f(x)=f(x+k) where k is some constant. One example would be sin(x), because sin(x)=sin(x+2pi). In this problem, n k ≡ n k + 4 ( m o d 1 0 ) for all k (and whichever digit n).
Log in to reply
yeah I know the definition of periodic...but explain the last line pls
Log in to reply
@Rajdeep Brahma – Some of the powers of digits repeat every 2nd power (i.e. 4^n=4,6,4,6,...). 2 is a factor of 4 so they also repeat every 4th power hence n k ≡ n k + 4 ( m o d 1 0 )
Log in to reply
@John Ross – Pls explain what u meant by 'some of the powers of digits' why some,why not all?
Log in to reply
@Rajdeep Brahma – 0 k , 1 k , 5 k , 6 k ( m o d 1 0 ) have fundamental period 1; 4 k , 9 k ( m o d 1 0 ) have fundamental period 2; 2 k , 3 k , 7 k , 8 k ( m o d 1 0 ) have fundamental period 4.
Log in to reply
@John Ross – Ok...that is interesting...didn't know..nice
I found two ways to solve this problem.
n is a whole number.
Here is the first one, using this rule : if n ≡ a (mod k) then n^5 ≡ a^5 (mod k)
If n ≡ 0 (mod 10) then n^5 ≡ 0 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 1 (mod 10) then n^5 ≡ 1 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 2 (mod 10) then n^5 ≡ 32 ≡ 2 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 3 (mod 10) then n^5 ≡ 243 ≡ 3 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 4 (mod 10) then n^5 ≡ 1024 ≡ 4 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 5 (mod 10) then n^5 ≡ 3125 ≡ 5 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 6 (mod 10) then n^5 ≡ 7776 ≡ 6 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 7 (mod 10) then n^5 ≡ 16807 ≡ 7 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 8 (mod 10) then n^5 ≡ 32768 ≡ 8 (mod 10), so n^5 ≡ n (mod 10)
If n ≡ 9 (mod 10) then n^5 ≡ 59049 ≡ 9 (mod 10), so n^5 ≡ n (mod 10)
So n^5 ≡ n (mod 10), which means that n has the same last digit as n^5 (in base 10).
Here is the second one, using mathematical induction :
Basis : n=1, n^5 ≡ 1^5 ≡ 1 ≡ n (mod 10)
Induction : Assume true k^5 ≡ k (mod 10) Show true (k+1)^5 ≡ k+1 (mod 10)
(k+1)^5 = k^5 + 5k^4 +10k^3 + 10k^2 + 5k + 1 (k+1)^5 ≡ k + 1 + 5(k^4 + k) (mod 10)
We need to show that 5(k^4 + k) ≡ 0 (mod 10), which is equivalent to k^4 + k being an even number.
If k is an even number, then k = 2m. And k^4 + k = 16m^4 + 2m = 2(8m^4 + m) If k is an odd number, then k = 2m + 1. And k^4 + k = (2m + 1)^4 + 2m + 1 = 16m4 + 32m3 + 24m2 + 8m + 1 + 2m + 1 = 2(8m^4 + 16m^3 + 12m^2 + 5m + 1) So k^4 + k is an even number.
5(k^4 + k) ≡ 0 (mod 10), so (k+1)^5 ≡ k + 1 (mod 10)
Conclusion : n^5 ≡ n (mod 10), which means that n has the same last digit as n^5 (in base 10).
I am not that familiar with Fermat’s Little Theorem, but I don’t know if my solution have something to do with it. I will simply make an equation and test its validity.
n 5 = x + n where x is an integer divisible by 5
This can also be rewritten as n 5 − n = x → n ( n 4 − 1 ) = x
The first possibility is that n is a number divisible by 5,then the equation will always be valid.
The second possibility is that n is an odd number that is not 5 then the integer ( n 4 ) will always end in 1 so when when subtracted by 1 will end up divisible by 5 which makes the equation valid.
The third possibility is that n is an even number then ( n 4 ) will end in 6 so when subtracted by 1 will also end up divisible by 5.
Graph x^5 on hp prime calculater, press Num, press Zoom-Integer.
is this a solution really??
n m o d 1 0 can only have 10 values V = { 0 , 1 , 2 , . . . 9 } ; So n 5 m o d 1 0 ≡ v i 5 m o d 1 0 where v i is one of the elements in V . Check each of the 10 cases (or better 5 cases only since 1 0 − r m o d 1 0 ≡ r m o d 1 0 ) using calculator .
Brute force solution doing the multiplication of any number ending in N with that same number. Each row of the table shows the last digit of a number after squaring, cubing, and so forth.
For example, let's take a look at a number ending in 4. If we square a number ending in 4 the last digit will always be a 6 since 4 * 4 = 16 and we are only concerned with the last digit. Taking this number ending in 6 and multiplying it by our original term ending in 4 will give us a number ending in 4, since 6 * 4 = 24. Continue in this manner to populate the table.
Since the digit in the first column is always equal to the digit in the last column the statement holds.
x 1 | x 2 | x 3 | x 4 | x 5 |
1 | 1 | 1 | 1 | 1 |
2 | 4 | 8 | 6 | 2 |
3 | 9 | 7 | 1 | 3 |
4 | 6 | 4 | 6 | 4 |
5 | 5 | 5 | 5 | 5 |
6 | 6 | 6 | 6 | 6 |
7 | 9 | 3 | 1 | 7 |
8 | 4 | 2 | 6 | 8 |
9 | 1 | 9 | 1 | 9 |
The simplest of all proofs would be that there will be either 1, 2 or 4 possible numbers in the units place of a given number raised any number of times. Since the number in units place depends only on that of it's previous power last digit must repeat a cycle. Hence the period of it will be 1,2 or 4. 😊
By Euler a ϕ ( n ) ≡ n 1 , so a ϕ ( n ) + 1 ≡ n a . With n = 1 0 we have ϕ ( 1 0 ) = 4 , so a 5 ≡ 1 0 a .
The last number of a product of two integers can be found by multiplying the last numbers. So is
0 ∗ 0 = 0 , 0 ∗ 0 = 0 , 0 ∗ 0 = 0 , 0 ∗ 0 = 0
1 ∗ 1 = 1 , 1 ∗ 1 = 1 , 1 ∗ 1 = 1 , 1 ∗ 1 = 1
2 ∗ 2 = 4 , 4 ∗ 2 = 8 , 8 ∗ 2 = 1 6 , 6 ∗ 2 = 1 2
3 ∗ 3 = 9 , 9 ∗ 3 = 2 7 , 7 ∗ 3 = 2 1 , 1 ∗ 3 = 3
4 ∗ 4 = 1 6 , 6 ∗ 4 = 2 4 , 4 ∗ 4 = 1 6 , 6 ∗ 4 = 2 4
5 ∗ 5 = 2 5 , 5 ∗ 5 = 2 5 , 5 ∗ 5 = 2 5 , 5 ∗ 5 = 2 5
6 ∗ 6 = 3 6 , 6 ∗ 6 = 3 6 , 6 ∗ 6 = 3 6 , 6 ∗ 6 = 3 6
7 ∗ 7 = 4 9 , 9 ∗ 7 = 6 3 , 3 ∗ 7 = 2 1 , 1 ∗ 7 = 7
8 ∗ 8 = 6 4 , 4 ∗ 8 = 3 2 , 2 ∗ 8 = 1 6 , 6 ∗ 8 = 4 8
9 ∗ 9 = 8 1 , 1 ∗ 9 = 9 , 9 ∗ 9 = 8 1 , 1 ∗ 9 = 9 .
For all integers ⩾ 1 0 , the same applies.
1 1 1 1 1 - 1 2 4 8 6 2 - 2 3 9 7 1 3 - 3 4 6 4 6 4 - 4 5 5 5 5 5 - 5 6 6 6 6 6 - 6 7 9 3 1 7 - 7 8 4 2 6 8 - 8 9 1 9 1 9 - 9 0 0 0 0 0 - 0
The answer is yes if we prove that n^5-n= a (number that ends with a 0) so a number that can be written as... =2k.
n^5-n=n((n^4)-1) n is either a 2k number (1) or a 2k+1 one(2) If (1), (n^4)-1 is a 2k+1 number If (2), (n^4)-1 is a 2k number
But (a 2k number) * (a 2k+1 one) = a 2k number Hence proved
Can someone explain in simpler terms?
The last digit of a power only depends on the last digit of the number. So, it's enough to check that the statement is true for digits 0-9, which it is...
Log in to reply
Your solution is the simplest one yet.....even a 5th grader can do this! No Mod, Fermat, no Pascal....
Problem Loading...
Note Loading...
Set Loading...
All whole numbers can be expressed as sums of certain powers of ten; 437=4x10^2 + 3x10^1 + 7x10^0 = 400 + 30 + 7. When raised to any power all terms except the “ones” place will end with 0, since all multiples of powers of 10 end with 0.
As stated above, this works for all powers. For example, 79^2 will end with 1, since 9^2 is 81, and all other digits contribute nothing to the “ones” place. Indeed 79^2=6241.
All that’s left to show for the power of 5 is that that the pattern holds for the ten digits 0 through 9, so...
0^5=0
1^5=1
2^5=32
3^5=243
4^5=1024
5^5=3125
6^5=7776
7^5=16807
8^5=32768
9^5=59049