Alternating prime tower

1 3 1 7 1 3 17 \Large 13^{17^{13^{17}}}

Find the last 3 digits of the number given above.


The answer is 333.

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.

2 solutions

Ashish Gupta
Feb 8, 2017

Yup this works!

Note that we can simplify the arithmetic greatly if we use Carmichael's lambda function in favor of Euler's totient function (as shown by Alan).

Pi Han Goh - 4 years, 4 months ago

Log in to reply

I didn't know about Carmichael's lambda function. Had to work with the tools I had. :)

Ashish Gupta - 4 years, 3 months ago

We'll be using the following theorem: let a , b , n N a,b,n \in \mathbb{N} with gcd ( a , n ) = 1 \gcd(a,n)=1 , then a b a b m o d λ ( n ) ( m o d n ) a^b \equiv a^{b \mod \lambda(n)} \pmod{n} . ( λ \lambda denotes the Carmichael function )

Let x = 1 3 1 7 1 3 17 x=13^{17^{13^{17}}} , we want to find x m o d 1000 x \mod 1000 . We have: x 1 3 1 7 1 3 17 m o d λ ( 1000 ) 1 3 1 7 1 3 17 m o d 100 ( m o d 1000 ) x \equiv 13^{17^{13^{17}} \mod \lambda(1000)} \equiv 13^{17^{13^{17}} \mod 100} \pmod {1000} Let y = 1 7 1 3 17 y=17^{13^{17}} , we have: y 1 7 1 3 17 m o d λ ( 100 ) 1 7 1 3 17 m o d 20 ( m o d 100 ) y \equiv 17^{13^{17} \mod \lambda(100)} \equiv 17^{13^{17} \mod 20} \pmod {100} Let z = 1 3 17 z=13^{17} , we have: z 1 3 17 m o d λ ( 20 ) 1 3 17 m o d 4 1 3 1 13 ( m o d 20 ) z \equiv 13^{17 \mod \lambda(20)} \equiv 13^{17 \mod 4} \equiv 13^1 \equiv 13 \pmod {20} Finally reverse the steps: y 1 7 13 1 7 3 × 4 + 1 491 3 4 × 17 1 3 4 × 17 16 9 2 × 17 6 9 2 × 17 4761 × 17 61 × 17 37 ( m o d 100 ) y \equiv 17^{13} \equiv 17^{3 \times 4 + 1} \equiv 4913^4 \times 17 \equiv 13^4 \times 17 \equiv 169^2 \times 17 \equiv 69^2 \times 17 \equiv 4761 \times 17 \equiv 61 \times 17 \equiv 37 \pmod{100} x 1 3 37 1 3 3 × 12 + 1 219 7 12 × 13 ( 19 7 2 ) 6 × 13 3880 9 6 × 13 ( 19 1 2 ) 3 × 13 3648 1 3 × 13 48 1 2 × 481 × 13 361 × 481 × 13 641 × 13 333 ( m o d 1000 ) x \equiv 13^{37} \equiv 13^{3 \times 12 + 1} \equiv 2197^{12} \times 13 \equiv \left(197^2\right)^6 \times 13 \equiv 38809^6 \times 13 \equiv \left(191^2\right)^3 \times 13 \equiv 36481^3 \times 13 \equiv 481^2 \times 481 \times 13 \equiv 361 \times 481 \times 13 \equiv 641 \times 13 \equiv \boxed{333} \pmod{1000}

What's more interesting to note is that we can generalize this to:

Let q 1 = 1 3 17 q_1 = 13^{17} and q n + 1 = 1 3 1 7 q n \Large q_{n+1} = 13^{17^{q_n}} for n = 1 , 2 , n=1,2,\ldots , then the last 3 digits of q 2 , q 3 , q 4 , q_2, q_3, q_4, \ldots are all 333.

Pi Han Goh - 4 years, 4 months ago

Log in to reply

Solve my problem: Alternating Palindrome Tower, to get another such interesting result.

Mrigank Shekhar Pathak - 4 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...