min n Z + \min n \in \mathbb{Z}_+ for which ( 5 n ) m o d 2 32 (5\uparrow\uparrow n) \bmod 2^{32} is at a fixed point?

What is the smallest positive integer n n for which 5 n m o d 2 32 5\uparrow\uparrow n \bmod 2^{32} is at a fixed point?

2 , 2 2 , 2 2 2 , 2 2 2 2 , 2 2 2 2 2 , 2 2 2 2 2 2 , 2 2 2 2 2 2 2 , 2 2 2 2 2 2 2 2 , 2 2 2 2 2 2 2 2 2 , 2 2 2 2 2 2 2 2 2 2 2, 2^2, 2^{2^2}, 2^{2^{2^2}}, 2^{2^{2^{2^2}}}, 2^{2^{2^{2^{2^2}}}}, 2^{2^{2^{2^{2^{2^2}}}}}, 2^{2^{2^{2^{2^{2^{2^2}}}}}}, 2^{2^{2^{2^{2^{2^{2^{2^2}}}}}}}, 2^{2^{2^{2^{2^{2^{2^{2^{2^2}}}}}}}} are 2 n 2\uparrow\uparrow n for n from 1 to 10.

n ( 5 n ) m o d 2 32 n\to (5\uparrow\uparrow n) \bmod 2^{32} is a function from n n to another positive integer.

Proof by induction on n n : Let n = 5 k s n=5^k s for s s coprime to 5. By the Chinese remainder theorem, it is enough to prove that the sequence is eventually constant modulo 5 k 5^k and modulo s. The claim modulo 5 k 5^k is obvious -- the sequence is eventually zero. For s coprime to 5, since GCD(5,s)=1, the value of 5 x 5^x modulo s is determined by ( x m o d ϕ ( s ) ) (x \bmod \phi (s)) . By induction, the sequence is eventually constant m o d ϕ ( s ) \bmod \phi (s) , so it is also eventually constant modulo s \therefore .


The answer is 15.

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.

1 solution

Matt Janko
Aug 16, 2020

The values 5 n 5 \uparrow \uparrow n are known as tetrations of 5 5 . For compactness, we will write t n t_n to denote 5 n 5 \uparrow \uparrow n . Consider first the easier-to-compute sequence of residues t n m o d 2 8 t_n \bmod 2^8 . The first few values are t 1 m o d 2 8 = 5 , t 2 m o d 2 8 = 53 , t 3 m o d 2 8 = 117. t_1 \bmod{2^8} = 5, \ \ \ \ \ t_2 \bmod{2^8} = 53, \ \ \ \ \ t_3 \bmod{2^8} = 117. So far, the sequence is not constant, but something important happens between t 2 t_2 and t 3 t_3 : t 3 t 2 ( m o d 64 ) . (1) t_3 \equiv t_2 \pmod{64}. \tag{1} This matters because 64 64 is the multiplicative order of 5 5 modulo 2 8 2^8 (i.e., 64 64 is the smallest positive integer m m that satisfies 5 m 1 ( m o d 2 8 ) 5^m \equiv 1 \pmod {2^8} ). By an elementary property of modular exponentiation, a b ( m o d 64 ) a \equiv b \pmod{64} if and only if 5 a 5 b ( m o d 2 8 ) 5^a \equiv 5^b \pmod{2^8} . Once we see (1), we know t 4 5 t 3 5 t 2 t 3 ( m o d 2 8 ) . t_4 \equiv 5^{t_3} \equiv 5^{t_2} \equiv t_3 \pmod{2^8}. Of course, this means t 4 t 3 ( m o d 64 ) t_4 \equiv t_3 \pmod{64} as well, so when we continue the exponentiation, we get t 3 t 4 t 5 t 6 ( m o d 2 8 ) . t_3 \equiv t_4 \equiv t_5 \equiv t_6 \equiv \cdots \pmod{2^8}. To summarize, the residues t n m o d 2 8 t_n \bmod 2^8 are constant for n 3 n \geq 3 because t n + 1 t n ( m o d 64 ) t_{n + 1} \equiv t_n \pmod{64} , and 64 64 is the multiplicative order of 5 5 modulo 2 8 2^8 . The residues become constant starting at t 3 t_3 because t 3 t_3 is the first tetration for which a congruence like (1) holds. We can apply this reasoning to help us answer the question posed, but first, here is a useful fact about the multiplicative order of 5 5 modulo some power of 2 2 .

Lemma. For any integer c 2 c \geq 2 , the multiplicative order of 5 5 modulo 2 c 2^c is 2 c 2 2^{c - 2} .

Proof. When c = 2 c = 2 , the lemma holds since 5 = 1 2 2 + 1 5 2 0 1 1 1 ( m o d 2 2 ) . 5 = 1 \cdot 2^2 + 1 \implies 5^{2^0} \equiv 1^1 \equiv 1 \pmod{2^2}. Notice that the right side of the first equation has an odd multiple of 2 2 2^2 . By way of induction, suppose the lemma holds for some value c 2 c \geq 2 , so that 5 2 c 2 1 ( m o d 2 c ) , (2) 5^{2^{c - 2}} \equiv 1 \pmod{2^c}, \tag{2} and 2 c 2 2^{c - 2} is the smallest positive exponent for which this congruence holds. Further suppose that, for some odd integer d d , 5 2 c 2 = d 2 c + 1. (3) 5^{2^{c - 2}} = d \cdot 2^c + 1. \tag{3} Notice that 5 2 c 1 = ( 5 2 c 2 ) 2 = ( d 2 c + 1 ) 2 . 5^{2^{c - 1}} = (5^{2^{c - 2}})^2 = (d \cdot 2^c + 1)^2. We can rewrite the right side of this equation to show 5 2 c 1 = 2 c + 1 ( d 2 2 c 1 + d ) + 1. 5^{2^{c - 1}} = 2^{c + 1}(d^2 \cdot 2^{c - 1} + d) + 1. As in the inductive hypothesis, this equation has an odd multiple of 2 c + 1 2^{c + 1} . It also shows 5 2 c 1 1 ( m o d 2 c + 1 ) . 5^{2^{c - 1}} \equiv 1 \pmod{2^{c + 1}}. This means that the order of 5 5 is some power of 2 2 , say 2 b 2^b , with b c 1 b \leq c - 1 . But 5 2 b 1 ( m o d 2 c + 1 ) 5^{2^b} \equiv 1 \pmod{2^{c + 1}} implies 5 2 b 1 ( m o d 2 c ) 5^{2^b} \equiv 1 \pmod{2^c} . This means b c 2 b \not < c - 2 since otherwise 2 c 2 2^{c - 2} would not be the smallest exponent for which (2) holds. Also, b c 2 b \neq c - 2 because in (3) we assumed d d was odd, which means d 2 c d \cdot 2^c is not divisible by 2 c + 1 2^{c + 1} and thus 5 2 c 2 ≢ 1 ( m o d 2 c + 1 ) 5^{2^{c - 2}} \not \equiv 1 \pmod{2^{c + 1}} . Therefore, we have shown that the order of 5 5 is 2 c 1 2^{c - 1} , so the lemma holds for c + 1 c + 1 . By induction, the lemma holds for all c 2 c \geq 2 .

We have shown that t n + 1 t n ( m o d 2 8 ) n 3 , t_{n + 1} \equiv t_n \pmod{2^8} \ \ \ \ \ \iff \ \ \ \ n \geq 3, and by the lemma, 2 8 2^8 is the multiplicative order of 5 5 modulo 2 10 2^{10} . This means t n + 2 5 t n + 1 5 t n t n + 1 ( m o d 2 10 ) n 3. t_{n + 2} \equiv 5^{t_{n + 1}} \equiv 5^{t_n} \equiv t_{n + 1} \pmod{2^{10}} \ \ \ \ \iff \ \ \ \ n \geq 3. If we repeat this reasoning twelve times, we obtain t n + 13 t n + 12 ( m o d 2 32 ) n 3 , t_{n + 13} \equiv t_{n + 12} \pmod{2^{32}} \ \ \ \ \iff \ \ \ \ n \geq 3, or equivalently, t n + 1 t n ( m o d 2 32 ) n 15. t_{n + 1} \equiv t_n \pmod{2^{32}} \ \ \ \ \iff \ \ \ \ n \geq 15. Therefore, we have shown that smallest value n n for which t n m o d 2 32 t_n \bmod 2^{32} is constant is 15 \boxed{15} . Furthermore, we can say in general that t n + 1 t n ( m o d 2 2 k ) n k 1. t_{n + 1} \equiv t_n \pmod{2^{2k}} \ \ \ \ \iff\ \ \ \ n \geq k - 1.

Thank you.

It was a fun problem, thanks for posting it.

Matt Janko - 9 months, 4 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...