Let a n be a sequence defined by recurrence relation: a 1 = 7 and a n + 1 = 7 a n ∀ n ∈ N . What is the smallest natural number n such that 7 n ≡ a 2 0 1 8 (mod 1 0 8 ) ?
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.
The trick I used was to determine that 5 0 0 , 0 0 0 is the smallest n such that 7 n = 1 mod 1 0 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 5 0 0 , 0 0 0 . 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.
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
Problem Loading...
Note Loading...
Set Loading...
Continuing the proof from the sister problem ...
Note that 7 2 ≡ 1 ( m o d 1 6 ) , which means that 7 2 n ≡ 1 ( m o d 2 n + 3 ) for all integers n ≥ 1 . Similarly 7 4 ≡ 1 ( m o d 2 5 ) , and hence 7 4 × 5 n ≡ 1 ( m o d 5 n + 2 ) for all n ≥ 0 . We certainly deduce that 7 1 0 n ≡ 1 ( m o d 1 0 n + 2 ) for all n ≥ 2 . We also note that 7 2 0 ≡ 1 ( m o d 1 0 0 0 ) .
Letting a n = ( n ) 7 denote that level n tetration of 7 , we see that a 2 = 7 7 ≡ 3 ( m o d 2 0 ) , and hence a 3 ≡ 7 3 ≡ 3 4 3 ( m o d 1 0 0 0 ) . Thus a 3 a 4 a 5 a 6 a 7 ≡ ≡ ≡ ≡ ≡ 4 3 ( m o d 1 0 2 ) 3 4 3 ( m o d 1 0 3 ) 2 3 4 3 ( m o d 1 0 4 ) 7 2 3 4 3 ( m o d 1 0 5 ) 1 7 2 3 4 3 ( m o d 1 0 6 ) ⇒ ⇒ ⇒ ⇒ ⇒ a 4 a 5 a 6 a 7 a 8 ≡ ≡ ≡ ≡ ≡ 7 4 3 ≡ 2 3 4 3 ( m o d 1 0 4 ) 7 3 4 3 ≡ 7 2 3 4 3 ( m o d 1 0 5 ) 7 2 3 4 3 ≡ 1 7 2 3 4 3 ( m o d 1 0 6 ) 7 7 2 3 4 3 ≡ 5 1 7 2 3 4 3 ( m o d 1 0 7 ) 7 1 7 2 3 4 3 ≡ 6 5 1 7 2 3 4 3 ( m o d 1 0 8 ) Moreover a n ≡ 7 1 7 2 3 4 3 ( m o d 1 0 8 ) ⇒ a n ≡ 6 5 1 7 2 3 4 3 ( m o d 1 0 8 ) ⇒ a n ≡ 1 7 2 3 4 3 ( m o d 1 0 6 ) ⇒ a n + 1 ≡ 7 1 7 2 3 4 3 ( m o d 1 0 8 ) Thus we deduce that a n ≡ 7 1 7 2 3 4 3 ( m o d 1 0 8 ) for all n ≥ 8 . While we have used the fact that 7 1 0 6 ≡ 1 ( m o d 1 0 8 ) , the results in the first paragraph show that 7 5 0 0 0 0 0 ≡ 1 ( m o d 1 0 8 ) . In fact 5 0 0 0 0 0 is the order of 7 modulo 1 0 8 , and so the smallest possible positive integer n such that a 2 0 1 8 ≡ 7 n ( m o d 1 0 8 ) is 1 7 2 3 4 3 .
What is interesting is the developing pattern. Note that a 3 ≡ a 2 ≡ 4 3 ( m o d 1 0 2 ) . If m ≥ 3 and a m ≡ a 2 ( m o d 1 0 2 ) , then a m + 1 ≡ 7 a m ≡ 7 a 2 ≡ a 3 ≡ a 2 ( m o d 1 0 4 ) , so certainly a m ≡ a 2 ( m o d 1 0 2 ) . By induction, then, a m ≡ a 2 ( m o d 1 0 2 ) .
Suppose now that n ≥ 2 and that a m ≡ a n ( m o d 1 0 n ) for all m > n . Then a m + 1 ≡ 7 a m ≡ 7 a n ≡ a n + 1 ( m o d 1 0 n + 2 ) , and so certainly a m + 1 ≡ a n + 1 ( m o d 1 0 n + 1 ) for all m > n , and hence a m ≡ a n + 1 ( m o d 1 0 n + 1 ) for all m > n + 1 . Thus we deduce that a m ≡ a n ( m o d 1 0 n ) for all m > n ≥ 2 .