Is this a joke?

Let a n a_n be a sequence defined by recurrence relation: a 1 = 7 a_1 = 7 and a n + 1 = 7 a n a_{n + 1} = 7^{a_n} n N \forall n \in \mathbb{N} . What is the smallest natural number n n such that 7 n a 2018 (mod 1 0 8 ) 7^n \equiv a_{2018} \text{ (mod }10^8) ?


The answer is 172343.

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.

3 solutions

Mark Hennings
Mar 7, 2018

Continuing the proof from the sister problem ...

Note that 7 2 1 ( m o d 16 ) 7^2 \equiv 1 \pmod{16} , which means that 7 2 n 1 ( m o d 2 n + 3 ) 7^{2^n} \equiv 1 \pmod{2^{n+3}} for all integers n 1 n \ge 1 . Similarly 7 4 1 ( m o d 25 ) 7^4 \equiv 1 \pmod{25} , and hence 7 4 × 5 n 1 ( m o d 5 n + 2 ) 7^{4 \times 5^n} \equiv 1 \pmod{5^{n+2}} for all n 0 n \ge 0 . We certainly deduce that 7 1 0 n 1 ( m o d 1 0 n + 2 ) 7^{10^n} \equiv 1 \pmod{10^{n+2}} for all n 2 n\ge 2 . We also note that 7 20 1 ( m o d 1000 ) 7^{20} \equiv 1 \pmod{1000} .

Letting a n = ( n ) 7 a_n = {}^{(n)}7 denote that level n n tetration of 7 7 , we see that a 2 = 7 7 3 ( m o d 20 ) a_2 = 7^7 \equiv 3 \pmod{20} , and hence a 3 7 3 343 ( m o d 1000 ) a_3 \equiv 7^3 \equiv 343 \pmod{1000} . Thus a 3 43 ( m o d 1 0 2 ) a 4 7 43 2343 ( m o d 1 0 4 ) a 4 343 ( m o d 1 0 3 ) a 5 7 343 72343 ( m o d 1 0 5 ) a 5 2343 ( m o d 1 0 4 ) a 6 7 2343 172343 ( m o d 1 0 6 ) a 6 72343 ( m o d 1 0 5 ) a 7 7 72343 5172343 ( m o d 1 0 7 ) a 7 172343 ( m o d 1 0 6 ) a 8 7 172343 65172343 ( m o d 1 0 8 ) \begin{array}{rclcrcl} a_3 & \equiv & 43 \pmod{10^2} & \Rightarrow & a_4 & \equiv & 7^{43} \equiv 2343 \pmod{10^4} \\ a_4 & \equiv & 343 \pmod{10^3} & \Rightarrow & a_5 & \equiv & 7^{343} \equiv 72343 \pmod{10^5} \\ a_5 & \equiv & 2343 \pmod{10^4} & \Rightarrow & a_6 & \equiv & 7^{2343} \equiv 172343 \pmod{10^6} \\ a_6 & \equiv & 72343 \pmod{10^5} & \Rightarrow & a_7 & \equiv & 7^{72343} \equiv 5172343 \pmod{10^7} \\ a_7 & \equiv & 172343 \pmod{10^6} & \Rightarrow & a_8 & \equiv & 7^{172343} \equiv 65172343 \pmod{10^8} \end{array} Moreover a n 7 172343 ( m o d 1 0 8 ) a n 65172343 ( m o d 1 0 8 ) a n 172343 ( m o d 1 0 6 ) a n + 1 7 172343 ( m o d 1 0 8 ) a_n \equiv 7^{172343} \pmod{10^8} \;\Rightarrow\; a_n \equiv 65172343 \pmod{10^8} \;\Rightarrow\; a_n \equiv 172343 \pmod{10^6} \;\Rightarrow\; a_{n+1} \equiv 7^{172343} \pmod{10^8} Thus we deduce that a n 7 172343 ( m o d 1 0 8 ) a_n \equiv 7^{172343} \pmod{10^8} for all n 8 n \ge 8 . While we have used the fact that 7 1 0 6 1 ( m o d 1 0 8 ) 7^{10^6} \equiv 1 \pmod{10^8} , the results in the first paragraph show that 7 500000 1 ( m o d 1 0 8 ) 7^{500000} \equiv 1 \pmod{10^8} . In fact 500000 500000 is the order of 7 7 modulo 1 0 8 10^8 , and so the smallest possible positive integer n n such that a 2018 7 n ( m o d 1 0 8 ) a_{2018} \equiv 7^n \pmod{10^8} is 172343 \boxed{172343} .


What is interesting is the developing pattern. Note that a 3 a 2 43 ( m o d 1 0 2 ) a_3 \equiv a_2 \equiv 43 \pmod{10^2} . If m 3 m \ge 3 and a m a 2 ( m o d 1 0 2 ) a_m \equiv a_2 \pmod{10^2} , then a m + 1 7 a m 7 a 2 a 3 a 2 ( m o d 1 0 4 ) a_{m+1} \equiv 7^{a_m} \equiv 7^{a_2} \equiv a_3 \equiv a_2 \pmod{10^4} , so certainly a m a 2 ( m o d 1 0 2 ) a_m \equiv a_2 \pmod{10^2} . By induction, then, a m a 2 ( m o d 1 0 2 ) a_m \equiv a_2 \pmod{10^2} .

Suppose now that n 2 n \ge 2 and that a m a n ( m o d 1 0 n ) a_m \equiv a_n \pmod{10^n} for all m > n m > n . Then a m + 1 7 a m 7 a n a n + 1 ( m o d 1 0 n + 2 ) a_{m+1} \equiv 7^{a_m} \equiv 7^{a_n} \equiv a_{n+1} \pmod{10^{n+2}} , and so certainly a m + 1 a n + 1 ( m o d 1 0 n + 1 ) a_{m+1} \equiv a_{n+1} \pmod{10^{n+1}} for all m > n m > n , and hence a m a n + 1 ( m o d 1 0 n + 1 ) a_m \equiv a_{n+1} \pmod{10^{n+1}} for all m > n + 1 m > n+1 . Thus we deduce that a m a n ( m o d 1 0 n ) a_m \equiv a_n \pmod{10^n} for all m > n 2 m > n \ge 2 .

James Wilson
Jul 27, 2018

The trick I used was to determine that 500 , 000 500,000 is the smallest n n such that 7 n = 1 7^n=1 mod 1 0 8 10^8 (a nice little fact). I determined that fact by writing the following (Matlab) code: t=7;counter=1; while t~=1, counter=counter+1;t=mod(7 t,10^8);end. The output of the counter gives the answer of 500 , 000 500,000 . Then I wrote the following code to finish the job: a=7; for n=2:2018 a=mod(a,500000); m=1; for j=1:a m=mod(7 m,10^8); end a=m; end t=1; counter = 0; while t~=a counter = counter +1; t = mod(7*t,10^8); end. Again, the output of the counter gives the final answer of 172343.

Atman Kar
Apr 6, 2018

I wrote a code to find 7 hyperexponentiated 2018 times, and then bruteforced till I found a solution. Very cheap method but it worked xP

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...