The Exponentorial of 2018 2018

n ¡ = n ( n 1 ) ( n 2 ) . . . 2 1 \LARGE n¡=n^{{(n-1)}^{{(n-2)}^{.^{.^{.^{2^{\small1}}}}}}}

If n ¡ is defined as above, what are the last two digits of the number 2018 ¡ ? 2018¡?

Note: ¡ \large ¡ is the factorial notation ! ! turned upside down. Note that ¡ \large ¡ keeps exponentiating while ! ! keeps multiplying.


The answer is 68.

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.

4 solutions

Chew-Seong Cheong
Jan 28, 2018

Relevant wiki: Euler's Theorem

Let N = 2018 ¡ N=2018¡ . We need to find N m o d 100 N \bmod 100 . Since 2018 and 100 are not coprime integers, we have to consider the factors 4 and 25 of 100 separately using Chinese remainder theorem .

Consider factor 4 : N 0 (mod 4) N \equiv 0 \text{ (mod 4)} .

Consider factor 25 :

N 201 8 201 7 a m o d ϕ ( 25 ) (mod 25) Since gcd ( 2018 , 25 ) = 1 , Euler’s theorem applies. 201 8 201 7 a m o d 20 (mod 25) Euler’s totient function ϕ ( 25 ) = 20 201 8 201 7 201 6 b m o d ϕ ( 20 ) m o d 20 (mod 25) Again gcd ( 2017 , 20 ) = 1 , Euler’s theorem applies. 201 8 201 7 201 6 b m o d 8 m o d 20 (mod 25) Euler’s totient function ϕ ( 20 ) = 8 201 8 201 7 0 m o d 20 (mod 25) 201 8 1 (mod 25) 18 (mod 25) \large \begin{aligned} N & \equiv 2018^{\color{#3D99F6}2017^a \bmod \phi (25)} \text{ (mod 25)} & \small \color{#3D99F6} \text{Since }\gcd (2018, 25) = 1 \text{, Euler's theorem applies.} \\ & \equiv 2018^{\color{#3D99F6}2017^a \bmod 20} \text{ (mod 25)} & \small \color{#3D99F6} \text{Euler's totient function }\phi (25) = 20 \\ & \equiv 2018^{2017^{\color{#3D99F6} 2016^b \bmod \phi(20)} \bmod 20} \text{ (mod 25)} & \small \color{#3D99F6} \text{Again }\gcd (2017, 20) = 1 \text{, Euler's theorem applies.} \\ & \equiv 2018^{2017^{\color{#3D99F6} 2016^b \bmod 8} \bmod 20} \text{ (mod 25)} & \small \color{#3D99F6} \text{Euler's totient function }\phi (20) = 8 \\ & \equiv 2018^{2017^{\color{#3D99F6} 0} \bmod 20} \text{ (mod 25)} \\ & \equiv 2018^1 \text{ (mod 25)} \\ & \equiv 18 \text{ (mod 25)} \end{aligned}

Therefore, we have:

N 25 n + 18 where n is an integer. 25 n + 18 0 (mod 4) n + 2 0 (mod 4) n 2 (mod 4) N 25 ( 2 ) + 18 (mod 100) 68 (mod 100) \begin{aligned} \implies N & \equiv 25n + 18 & \small \color{#3D99F6} \text{where }n \text{ is an integer.} \\ 25n + 18 & \equiv 0 \text{ (mod 4)} \\ n + 2 & \equiv 0 \text{ (mod 4)} \\ \implies n & \equiv 2 \text{ (mod 4)} \\ \implies N & \equiv 25(2) + 18 \text{ (mod 100)} \\ & \equiv \boxed{68} \text{ (mod 100)} \end{aligned}

Yes, I did the same approach.

Hans Gabriel Daduya - 3 years, 4 months ago
Jeremy Galvagni
Feb 5, 2018

Last 2 digits of powers of 2018 will the same as for 18 and there will be a cycle (hopefully it's short.)

1 8 1 18^{1} ends in 18

1 8 2 18^{2} ends in 24

1 8 3 18^{3} ends in 32

1 8 4 18^{4} ends in 76

1 8 5 18^{5} ends in 68

1 8 6 18^{6} ends in 24 (same as 1 8 2 18^{2} so the cycle is length 4.)

So where do powers of 2017 get us mod 4?

2017 is 1 mod 4. Nice! 1*1=1 so all powers of 2017 are 1 mod 4.

We just need the right spot on the list. It can't be the 18 because that one is unique. Advance 4 spaces to 68.

Sir could u pls explain why did u Advance 4 spaces to 68????

erica phillips - 3 years ago

Log in to reply

The answer can't be 18 because only 18^1 ends in 18. Instead, because the cycle is of length 4, it's the last two digits of 18^5.

Jeremy Galvagni - 3 years ago

The phrasing is really weird about advancing. Here's how I understand it:

If it's a cycle of 4 and 0 mod 4, then no problem the last 2 digits will be the 4th in the cycle. But this sequence starts with 18 which isn't repested, so if it's 0mod 4 it should always be the 3rd. However since it's 1 mod 4, you have to move forward 1 more, meaning you end up at the 4th one.

To illustrate, let's say the cycle is only 24 32 76 68(no 18). If it's 0mod 4 then answer is 68. But since first number is 18, and it is not in the cycle, 0 mod 4 will be 76 instead. Thus 1 mod 4 will be 68

Wuu Yyiizzhhoouu - 2 years ago
Nick Turtle
Jan 28, 2018

We want to find a x x such that x 2018 ¡ ( m o d 100 ) x\equiv2018¡\pmod{100} .

This is equivalent to finding the unique 0 x < 100 0≤x<100 such that x 2018 ¡ ( m o d 4 ) x\equiv2018¡\pmod{4} x 2018 ¡ ( m o d 25 ) x\equiv2018¡\pmod{25}

The first equivalence is easy to solve, as clearly, 2018 ¡ 2018¡ is divisible by 4 4 , so x 0 ( m o d 4 ) x\equiv0\pmod{4} .

Consider the second equivalence: x 2018 ¡ 2018 2017 2016 . . . 2 1 18 2017 2016 . . . 2 1 ( m o d 25 ) x\equiv2018¡\equiv{2018}^{{2017}^{{2016}^{.^{.^{.^{2^1}}}}}}\equiv{18}^{{2017}^{{2016}^{.^{.^{.^{2^1}}}}}}\pmod{25}

Note that 2017 1 ( m o d 4 ) 2017\equiv1\pmod{4} and 18 4 ( 7 ) 4 ( 1 ) 2 1 ( m o d 25 ) {18}^4\equiv{(-7)}^4\equiv{(-1)}^2\equiv1\pmod{25} . Thus, for a certain integer k k , x 18 4 k + 1 18 4 k 18 1 18 ( m o d 25 ) x\equiv{18}^{4k+1}\equiv{18}^{4k}\cdot{18}^{1}\equiv18\pmod{25}

Thus, we're finding x 0 ( m o d 4 ) x\equiv0\pmod{4} x 18 ( m o d 25 ) x\equiv18\pmod{25}

By the Chinese Remainder Theorem, such a 0 x < 100 0≤x<100 exists and is unique. By trial-and-error, we find that x = 68 x=68 .

Can you please explain the second step when you reduce (mod 100) to (mod 4) and (mod 25)? I understood the rest of it....

Shanu Jindal - 3 years, 4 months ago

Log in to reply

If we're given a b ( m o d m n ) a\equiv b\pmod{mn} , where m m and n n are coprime integers, then a b ( m o d m ) a\equiv b\pmod{m} a b ( m o d n ) a\equiv b\pmod{n}

Nick Turtle - 3 years, 4 months ago

Log in to reply

Thank you!!!

Shanu Jindal - 3 years, 4 months ago

.#include <iostream> .#include <conio.h> //without dots in the beginning

using namespace std;

int powe(int arg, int power) { int result = 1; if (arg > 99) { while (arg > 99) arg = arg - 100; } while (power > 0) { result = result * arg; if (result > 99) { while (result > 99) result = result - 100; } power--; } return result; }

int main() { int n; cin >> n; int result = n; while (n > 1) { result = powe(result, n - 1); n--; } cout << result; _getch(); return 0; }

//n = 2018 result = 76 //c++

Efim Beshmenev - 3 years, 4 months ago

Log in to reply

I think you've been a bit lucky with the result here (there are only four values for the last two digits so it's not too surprising). You've calculated ((2018^2017)^2016)^... = 2018^(2017!). You needed to calculate 2018^(2017^(2016^...)) instead, which is not so easy.

Also, you could simplify your program. For example, you can replace

result = result * arg; if (result > 99) { while (result > 99) result = result - 100;

with

result = (result * arg)%100

Just as a general point too, you don't need something like if(x){while(x) ...}. If x is false, then you would skip the while loop anyway so just while(x) ... is sufficient.

Richard Farrer - 3 years, 4 months ago

@Nick Turtle Can you tell me how to use the factorial notation turned in LaTeX?

. . - 2 months, 2 weeks ago

Reduce!

Take note that 1 0 n 0 ( mod 100 ) 10^{n} \equiv 0\ (\text{mod} 100) if n n is an integer greater than 2.

Similar to the fact that k ! 0 ( mod 100 ) k! \equiv 0\ (\text{mod} 100) if k k is greater than or equal to 10, the entire expression, when working from the top to the bottom, hits reset when the expression hits every multiple of ten.

For example.

1 0 9 etc 10 0 9 9 etc 100 0 99 9 etc 0 ( mod 100 ) 10^{9^{\text{etc}}} \equiv 100^{99^{\text{etc}}} \equiv 1000^{999^{\text{etc}}} \equiv 0 (\text{mod} 100)

This is true because 1 1 n 0 ( mod 100 ) 11 ^ n \equiv 0 (\text{mod} 100) for every n that is multiple by then, therefore the reset works every time and does not get broken.

Thus,

201 8 201 7 etc 1 8 1 7 etc ( mod 100 ) 2018^{2017^{\text{etc}}} \equiv 18^{17^{\text{etc}}} (\text{mod} 100) .

Now, it should be easy to solve this.

1 8 1 18 ( mod 100 ) 18^1 \equiv 18 (\text{mod} 100)

1 8 2 24 ( mod 100 ) 18^2 \equiv 24 (\text{mod} 100)

1 8 3 32 ( mod 100 ) 18^3 \equiv 32 (\text{mod} 100)

1 8 4 76 ( mod 100 ) 18^4 \equiv 76 (\text{mod} 100)

1 8 5 68 ( mod 100 ) 18^5 \equiv 68 (\text{mod} 100)

1 8 6 24 ( mod 100 ) 18^6 \equiv 24 (\text{mod} 100)

Take note that the cycle length is four but the starting point of the cycle is 24.

Now let us figure out what is 1 7 1 6 etc ( mod 4 ) 17^{16^{\text{etc}}} (\text{mod} 4) . Luckily, 17 1 ( mod 4 ) 17 \equiv 1 (\text{mod} 4) , thus, 1 7 1 6 etc 1 ( mod 4 ) 17^{16^{\text{etc}}} \equiv 1 (\text{mod} 4)

Since the starting point of the cycle is the second number, we subtract from 2 from 1 and we get 1 2 = 1 3 ( mod 4 ) 1 - 2 = -1 \equiv 3 (\text{mod} 4) .

Therefore the remainder is the 3rd position from the starting point 24.

And we now have our answer. 201 8 201 7 etc 68 ( mod 100 ) . \boxed{2018^{2017^{\text{etc}}} \equiv 68 \ (\text{mod} 100). }

P.S. Forgive me for the incomplete nested exponents for I do not know how to stack more than two exponents. But you get the idea, right? Give me advice in the comment section if you have a solution to my naivete.)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...