What? Last digit of π \pi ?

What is the last digit of the number below?

3 14 159 \Large 3^{{14}^{159}}

9 9 1 1 7 7 3 3

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.

6 solutions

Mahdi Raza
Jul 7, 2020

The power cycle of 3 n 3^n is the following when n n is of the form ( 4 k + 1 ) , ( 4 k + 2 ) , ( 4 k + 3 ) , ( 4 k ) (\green{4}\orange{k} + 1), (\green{4}\orange{k} + 2), (\green{4}\orange{k}+3), (\green{4}\orange{k}) :

3 9 7 1 ( 4 k + 1 ) ( 4 k + 2 ) ( 4 k + 3 ) ( 4 k ) \begin{array}{c}&3 &\rightarrow &9 &\rightarrow &7 &\rightarrow &1 \\ &(\green{4}\orange{k}+1) &&(\green{4}\orange{k}+2) &&(\green{4}\orange{k}+3) &&(\green{4}\orange{k}) \end{array}

Then, let n n be 1 4 159 14^{159} , then clearly

1 4 159 = 4 × ( 1 4 157 × 7 2 ) = 4 k \begin{aligned} 14^{159} &= \green{4} \times \orange{(14^{157} \times 7^2)} \\ &= \green{4}\orange{k} \end{aligned}

Hence, the ending digit of 3 1 4 159 3^{14^{159}} will be:

1 \boxed{1}

Nice colorful solution!

Vinayak Srivastava - 11 months, 1 week ago

Log in to reply

Thank you, By the way, do you need to know the digits of π \pi

Mahdi Raza - 11 months, 1 week ago

Log in to reply

Yes, I know π \pi very well!

Vinayak Srivastava - 11 months, 1 week ago
Razing Thunder
Jul 7, 2020
1
2
3
4
s="3"
for i in range(1,160):
    s=str(int(s)**14)[-1]
print(s)

Good code!

Vinayak Srivastava - 11 months, 1 week ago

Log in to reply

thanks @Vinayak Srivastava by ther way from where you learned python

Razing Thunder - 11 months, 1 week ago

Log in to reply

I don't know much. I have only learned a few codes from the solutions of others.

Vinayak Srivastava - 11 months, 1 week ago

Nice code @Razing Thunder

A Former Brilliant Member - 11 months, 1 week ago

1 4 159 14^{159} is divisible by 4 4 so unit digit will be 3 3

Log in to reply

Yes, 1 4 159 14^{159} is divisible by 4 4 , so last digit will be same as 3 4 3^{4} , that is 1 1 .

Vinayak Srivastava - 11 months ago

We need to find 3 1 4 159 m o d 10 3^{14^{159}} \bmod 10 .

Solution 1: By binomial expansion

3 1 4 159 ( 3 2 ) 2 158 × 7 159 (mod 10) 9 2 158 × 7 159 (mod 10) ( 10 1 ) 2 158 × 7 159 (mod 10) ( 1 ) 2 158 × 7 159 (mod 10) The exponent 2 158 × 7 159 is even 1 (mod 10) \begin{aligned} 3^{14^{159}} & \equiv (3^2)^{2^{158}\times 7^{159}} \text{ (mod 10)} \\ & \equiv 9^{2^{158}\times 7^{159}} \text{ (mod 10)} \\ & \equiv (10-1)^{2^{158}\times 7^{159}} \text{ (mod 10)} \\ & \equiv (-1)^\blue{2^{158}\times 7^{159}} \text{ (mod 10)} & \small \blue{\text{The exponent }2^{158}\times 7^{159} \text{ is even}} \\ & \equiv \boxed 1 \text{ (mod 10)} \end{aligned}

Solution 2: By Euler's theorem . Since gcd ( 3 , 10 ) = 1 \gcd(3,10) = 1 , we can apply Euler's theorem as follows. Note that Euler's totient function ϕ ( 10 ) = 10 × 1 2 × 4 5 = 4 \phi(10) = 10 \times \frac 12 \times \frac 45 = 4 .

3 1 4 159 3 1 4 159 m o d ϕ ( 10 ) (mod 10) 3 1 4 159 m o d 4 (mod 10) 3 0 (mod 10) 1 (mod 10) \begin{aligned} 3^{14^{159}} & \equiv 3^{14^{159} \bmod \phi(10)} \text{ (mod 10)} \\ & \equiv 3^{14^{159} \bmod 4} \text{ (mod 10)} \\ & \equiv 3^0 \text{ (mod 10)} \\ & \equiv \boxed 1 \text{ (mod 10)} \end{aligned}

Nice use of mod! Brilliant solution, Sir!

Vinayak Srivastava - 11 months, 1 week ago

Log in to reply

Glad that you like it. I have added another solution.

Chew-Seong Cheong - 11 months, 1 week ago

3 1 4 159 = 3 14 × 1 4 158 = ( 4782969 ) 1 4 158 3^{14^{159}}=3^{14\times 14^{158}}=(4782969)^{14^{158}} . Last digit of 9 2 n 9^{2n} is 1 1 for any non-negative integer n n . So the required last digit is 1 \boxed 1 .

Nice solution Sir!

Vinayak Srivastava - 11 months, 1 week ago

Log in to reply

I posted the solution to make clear that the last digit of 3 14 3^{14} is not 7 7 , but 9 9 .

A Former Brilliant Member - 11 months, 1 week ago

Of course, one way to do this problem is to actually multiply everything (and break your calculator in the process), however, the easier way is to figure out the pattern in the last digits of the exponents.

You can break this problem down into two main parts.

First, find the last digit of 3 14 3^{14} .

The last digits of powers of 3 3 go in a cycle of four digits: 9 9 , 7 7 , 1 1 , and 3 3 .

3 2 = 9 , 3 3 = 2 7 , 3 4 = 8 1 , 3 5 = 24 3 , . . . 3^2 = \textbf{9}, 3^3 = 2\textbf{7}, 3^4 = 8\textbf{1}, 3^5 = 24\textbf{3}, ...

14 14 divided by 4 4 is 3 3 with the remainder 2 2 , which means that the last digit of 3 14 3^{14} will be 7 7 .

Now, to find the answer to the actual problem.

You don't have to find the last digits of the powers of 3 14 3^{14} because is essentially the same as finding the last digits of powers of 7 7 .

The last digits of powers of 7 7 also go in a cycle of four digits: 9 9 , 3 3 , 1 1 , and 7 7 .

7 2 = 4 9 , 7 3 = 34 3 , 7 4 = 240 1 , 7 5 = 1680 7 , . . . 7^2 = 4\textbf{9}, 7^3 = 34\textbf{3}, 7^4 = 240\textbf{1}, 7^5 = 1680\textbf{7}, ...

159 159 divided by 4 4 is 39 39 with the remainder 3 3 , which means that the last digit of ( 3 14 ) 159 \displaystyle (3^{14})^{159} will be 1 \boxed{1} .

@Rajam Arunprakash : Generally, 3 1 4 159 3^{14^{159}} implies 3 ( 1 4 159 ) 3^{(14^{159})} , not ( 3 14 ) 159 (3^{14})^{159} .

Ved Pradhan - 11 months, 1 week ago

Log in to reply

Oh. Wow I'm stupid. I'll edit this solution when I have some free time. Thank you!

Rajam Arunprakash - 11 months, 1 week ago

Log in to reply

Don't worry, it's a common mistake. You still got the right answer, though.

Ved Pradhan - 11 months, 1 week ago

@Rajam Arunprakash , @Alak Bhattacharya Sir is right, the last digit of 3 1 4 3^14 is 9 9 , not 7 7 .

Vinayak Srivastava - 11 months, 1 week ago

Last digit of 14 = 4 so 3^4 = 8 1 Last digit of 159 = 9 So 1^9 = 1 is the last number

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...