Units digit of a number raised to power
September 10, 2013How to Calculate Remainders of large numbers
November 13, 2013Here, we will see how to find the last two digits of a large number. In the previous post we tried to understand calculating the units digits of large numbers like $2014^{2012}$, $1453^{71}$ etc. In this post,
- We will first understand how to find the last two digits of a product.
- And then we will try to find the last two digits ( i.e digits in tens and units place) of a large number in the form ${x^y}$.
At the end of this post, take the quiz to test your understanding of the techniques to find the last two digits of large numbers in the form $x^y$
Video :
The video contains on explanation on how to find the last two digits of a number raised to power based on the units digit of the number.
Understanding the basics – Last two digits of a product
Last two digits of a number is basically the tens place and units place digit of that number. So given a number say 1439, the last two digits of this number are 3 and 9, which is pretty straight forward. Now, how do we find the last two digits in the product of 1439 x 2786? One feasible approach is using the vertical and cross wise technique of multiplication.
Process to calculate last two digits of a product:
In the product of two numbers say A and B, (in our case A is 1439 and B is 2786). If a and b, respectively represent the digits in the ten’s place and one’s place of A and similarly c and d respectively represent the digits in the ten’s place and one’s place of B, then
- Units digit of A x B is given by the units digit in the product of b and d. If the product of b and d results in more than 1 digit, the excess digit will be carried over to the left. i.e in 1439 x 2786, multiply 9 and 6 which gives 54. Here 4 forms the units digit of 1439 x 2786 and 5 goes as carry to Step 2.
- In this step, we cross multiply a and d & c and b, and then add the resulting products. i.e in 1439 x 2786 => 3×6 + 9×8 = 90
- If a carry is generated in Step 1, add that with the result obtained in Step 2. i.e 5 + 90 = 95
- The units digit in the result obtained in Step 3 forms the tens digit in the product of A and B. i.e the units digit in 95 which is 5 becomes the tens digit of 1439 x 2786.
Hence the last two digits of 1439 x 2786 is 5 and 4.
How to find the Last Two Digits of Number raised to Power
Let the number be in the form ${x^y}$. Based on the value of units digit in the base i.e x, we have four cases
Case 1: Units digit in x is 1
If x ends in 1, then x raised to y, ends in 1 and its tens digit is obtained by multiplying the tens digit in x with the units digit in y.
Example 1: Find the last two digits of ${91^{246}}$
Since the base 91 ends in 1, ${ 91^{246}}$ ends in 1 and the tens place digit is obtained from the units digit in 9×6 which is 4. Hence the last two digits of ${ 91^{246}}$ are 4 and 1.
Case 2: Units digit in x is 3, 7 or 9
In this case we will convert the base so that it ends in 1, after which we can use Case 1 to calculate units and tens place digits. i.e
When x ends in 9 ${(..9)^{y}}$
Raise the base by 2 and divide the exponent by 2 => ${(..9^2)^{y/2}}$
Number ending in 9 raised to 2 ends in 1 => ${(..1)^{y/2}}$
Since the base now ends in 1, Tens digit and Units digit is calculated using the steps in Case 1.
Example 2: Find the last two digits of ${(79)^{142}}$ => ${(79^2)^{142/2}}$ => ${(..41)^{71}}$
Now, units digit of a number ending in 41 to the power of 71 is 1 and its tens digit is obtained by multiplying 4 and 1 which is 4.
Hence, the last two digits of ${(79)^{142}}$ are 4 and 1.
Example 3: Find the last two digits of ${(79)^{143}}$ => $(79)^{142}$ x ${(79)^1}$
$(79)^{142}$ ends in 41 (From previous example) and ${(79)^1}$ ends in 79. Hence, the product of numbers ending in 41 and 79 ends in 39, which implies the last two digits of ${(79)^{143}}$ are 3 and 9.
When x ends in 3 ${(..3)^{y}}$
Raise the base by 4 and divide the exponent by 4 => ${(..3^4)^{y/4}}$
Number ending in 3 raised to 4 ends in 1 => ${(..1)^{y/4}}$
Since the base now ends in 1, Tens digit and Units digit is calculated using the steps in Case 1.
Example 4: Find the last two digits of ${(43)^{76}}$ => ${(43^4)^{76/4}}$ => ${(..01)^{19}}$
Now, units digit of a number ending in 01 to the power of 19 is 1 and its tens digit is obtained by multiplying 0 and 9 which is 0.
Hence, the last two digits of ${(43)^{76}}$ are 0 and 1.
When x ends in 7 ${(..7)^{y}}$
Raise the base by 4 and divide the exponent by 4 => ${(..7^4)^{y/4}}$
Number ending in 7 raised to 4 ends in 1 => ${(..1)^{y/4}}$
Since the base now ends in 1, Tens digit and Units digit is calculated using the steps in Case 1.
Example 5: Find the last two digits of ${(17)^{256}}$ => ${(17^4)^{256/4}}$ => ${(..21)^{44}}$
Units digit of a number ending in 21 to the power of 44 is 1 and its tens digit is obtained by multiplying 2 and 4 which is 8.
Hence, the last two digits of ${(17)^{256}}$ are 8 and 1.
Case 3: Units digit in x is 2, 4, 6 or 8
If x ends in 2, 4, 6, 0r 8, we can find the last two digits of the number raised to power with the help of the following points :
- ${(2)^{10}}$ ends in 24
- ${(24)^{odd\ number}}$ ends in 24
- ${(24)^{even\ number}}$ ends in 76
- ${(76)^{number}}$ ends in 76
Example 6: Find the last two digits of 2 raised to 1056″
${(2)^{1056}}$ => $(2^{10})^{105}$ x ${(2)^{6}}$
Here, 2 raised to 10 ends in 24 and 24 raised 105, which is an odd number, ends in 24. Also 2 raised to 6 ends in 64. Using the vertical and cross-wise multiplication technique last two digits of the product of the numbers ending in 24 and 64 are 3 and 6.
Case 4: Units digit in x is 5
- The digit in the tens place is odd and the exponent y is odd, then the number ends in 75.
- If the digit in the tens place is odd and the exponent y is even, then the number ends in 25.
- Or if the digit in the tens place is even and the exponent y is odd, then the number ends in 25.
- If the digit in the tens place is even and the exponent y is even, then the number ends in 25 .
Hence when the exponent and the digit in the tens place of the base are odd, the number raised to power ends 75, in other cases it ends in 25.
Example 7: Find the last two digits of ${(65)^{243}}$
Since the digit in the tens place of the base is even and the exponent is odd, last two digits of ${(65)^{243}}$ are 2 and 5.
Example 8: Find the last two digits of ${(135)^{1091}}$
Since the digit in the tens place of the base is odd and the exponent is odd, ${(65)^{243}}$ ends in 75.
Quiz : Test your Understanding
What Next?
Can you calculate the highest power of 15 in 24! or number of zeros at the end of 1000!? Click on the post below to learn more about highest power of numbers in a factorial.
30 Comments
regarding the shortcut mentioned about finding last two places of a number ending with 5, raised to odd power,
it will always end up in 25.
but u have mentioned as 75.
kindly clarify…!!
Hi Keshav,
In addition to the power, you also need to check whether the digit in ten’s place is odd or even –
The last two digits of a number ending in 5, raised to power will be 75 when the digit in the tens place is odd and the power is odd.
Example : $35^3$ = 42875
I get it now, Thanks
13^17 + 17^13 is divisible by 10?
A GRE question.
Thank you.
It is divisible by 10.
Units digit of 13^17 is 3 and units digit of 17^13 is 7.
Sum of the units digits, 3 and 7 is 10. Hence 13^17 + 17^13 ends in 0 which implies that it is divisible by 10.
To find the units digit Click here
Thank you very much.. You da real MVP 😉
In the second question of your quiz. Find the last two digits of 19^347 – 22^120. You used 19^346 in the solution.
Thanks Benedict :). I updated it.
How would you find the last two digits of (367) ^ 1054? As for the method mentioned, it doesn’t work since 1054 is not divisible by 4.
(367) ^ 1054 = ((367) ^ 1052) x (367) ^ 2
= ((367^4) ^ 263) x (..89) [Last two digits of 367^2 = 89]
=(21^263) x 89 [Last two digits of ..67^4 = 21]
= 61 x 89
= ..29
Yay! Thanks a lot. You’re awesome..
How to find remainder when 29^202 divided by 13?
Approach 1: Using the basic concept of remainders
$\frac{29^{202}}{13}$ =>
29 leaves a remainder 3 when divided by 13. Hence,
$\frac{29^{202}}{13}$ => $\frac{3^{202}}{13}$
$\frac{3^{202}}{13}$ = $\frac{3^{201} \text{ x } 3}{13}$
= $\frac{(3^{3})^{67} \text{ x } 3}{13}$
$3^3$ leaves remainder 1 when divided by 13. Hence
Remander of $\frac{(3^{3})^{67} \text{ x } 3}{13}$ =>Remainder of $\frac{(1)^{67} \text{ x } 3}{13}$ = 3
Approach 2: Using the Euler’s theorem described in this link -www.justquant.com/numbertheory/remainders-using-fermats-and-eulers-theorem/
$\frac{29^{202}}{13}$ =>
Since 29 and 13 are co primes, we can apply Euler’s theorem.
-> Calculate the Euler’s totient function of 13.
$=> \Phi(13) = 13(1 – \frac{1}{13})$ = 12
-> Divide the exponent 202 by $\Phi(13)$ to find remainder y.
$ y = $Remainder$(\frac{202}{\Phi(13)})$ = Remainder$(\frac{202}{12})$ => $10$
-> Find the remainder of 3 to the power of $y$ when divided by 13.
Remainder$(\frac{3^{y}}{13})$ = Remainder$(\frac{3^{10}}{13})$ = Remainder $(\frac{(3^3)^3 \text{ x } 3}{13})$ = Remainder$(\frac{1 \text{ x } 3}{13})$ = 3
Therefore,Remainder of $\frac{29^{202}}{13}$ = $3$
356 ** 463
((356 %10) ** (463 %10)) %100 = the 2 last digits =16
How to find the remainder when (164)^359 is divided by 100.
164$^{359}$ = 41$^{359}$ x 4$^{359}$
Last two digits of 41$^{359}$ => 61 [Using case 1]
Last two digits of 4$^{359}$
=> Last two digits of 2$^{718}$ = 44 [Using case 3]
Hence last two digits of 164$^{359}$ => Last two digits of 61 x 44 => 84
What is the remainder when 5^119 is divided by 59?
Abhishek,
You can solve this problem using the Fermat’s little theorem explained in this link: https://www.justquant.com/numbertheory/remainders-using-fermats-and-eulers-theorem/
Solve (2734) power 123 the epuation
Last two digits of 37^63?
287 HOW TO FIND THE LAST DIGIT NUMBER
what is the unit digit of 1234567^7654321 ?
This can be solved using the technique explained in https://www.justquant.com/numbertheory/units-digit-of-a-number-raised-to-power/
As per the trick,
1. last digit in base is 7.
2. Dividing the exponent by 4, we get remainder 1.
3. Units digit will be 4$^1$ = 4
What if the unit ends in 5 but there is a 0 in the ten place, e.g. 5^81?
Argument 1:
Indeed there are quite a lot of arguments on whether 0 is odd or even. Considering 0 as Even based on this post – https://www.britannica.com/story/is-zero-an-even-or-an-odd-number, 05$^81$ would end in 25.
Argument 2:
05$^2$ ends in 25 => 05$^4$ ends in 25 => In general 05$^{even}$ ends in 25
05$^3$ ends in 25 => 05$^2$ x 5 ends in 25 => 05$^even$ x 05$^1$ ends in 25
Hence, 05$^81$ => 05$^80$ x 05$^1$ => 05$^{even}$ x 05$^1$ ends in 25
How did you solve 79^2 to have last digits 41???
Beautifully Explained 🙂
Find the last two digits of 43^37
Last three digits of 1234^5678?
(43)^4 last two digits given is 01
but applying case I , GETTING 61 as follows
3^4 = 81 —— 1 is unit’s digit
4 * 4 = 16 —- 6 is tens digit
so last two digits = 61
kindly explain