3

How to find $2^{2^{2^{\cdot^{\cdot^{2}}}}} \mod 2016$ where $2$ occurs $2016$ times?
My current observations:

$$2^{11} = 2048 \equiv 2048=2016 \equiv 2^5 $$ and $$ 2^{16} \equiv 2^{11}\cdot 2^5 \equiv 2^{10} $$ and now we have $2012$ of "2" left...

2 Answers2

4

Hint: $2016 = 2^5 \cdot 3^2 \cdot 7$. Consider it separately mod $2^5$, mod $3^2$ and mod $7$, and combine using the Chinese Remainder Theorem.

Robert Israel
  • 448,999
3

$ \overbrace{2^{\large 2^{\Large 2K}}\!\!\!\bmod 2^{\large 5}\!\cdot 63}^{\large\ \ \ 2^{\Large 2K}\ge5\ \ {\rm by}\ \ K>1 }\, =\, 2^{\large 5}\!\left[\dfrac{{2^{\large \color{#c00}{2^{\Large 2K}}}}}{2^{\large 5}} \bmod\, 63\right] =\, 2^{\large 5}\overbrace{ \left[\,\dfrac{{2^{\large \color{#c00}{4}}}}{2^{\large 5}} \bmod 63\right]}^{\!\!\!\! \dfrac{2^{\large 5}}{2^{\large 6}_{\phantom{1}}}\ \ {\large \equiv}\ \ \dfrac{2^{\large 5}}{1}} =\, \bbox[5px,border:1px solid #c00]{2^{\large 5}[\,2^{\large 5}\,]}\ \ $ by

$\!\!\bmod 63\!:\ 2^{\large\color{#0a0} 6}\!\equiv 1\,$ so $\!\underbrace{\color{#c00}{2^{\large 2K}}\!\bmod\color{#0a0} 6_{\phantom{1}}}_{\large 2\ \mid\ 2^{\Large 2K}\ {\rm by} \ K>1}\!\!\! = 2\!\!\!\underbrace{\left[\dfrac{2^{\large 2K}}{2}\!\bmod 3\right]}_{ \dfrac{(-1)^{2K}}{-1}\ {\large \equiv}\ \dfrac{1}{-1} {\large}\ {\large \equiv}\ \ \large 2}\!\!\!\!\! =\color{#c00} 4$

Bill Dubuque
  • 272,048
  • We used $\ ab\bmod ac = a(b\bmod c) = $ mod Distributive Law $\ \ \ $ – Bill Dubuque May 12 '19 at 19:12
  • could you, please, explain me why you wrote over $2^{2^{2K}}$ a $2^4$ number? – jonnyWoox May 12 '19 at 19:35
  • 1
    @jonnyWoox The overbraced numerator is $\equiv 2^{\large\color{#c00} 4}\pmod{!63}$ by the calculation in the line below it, i.e. by reducing its $,\rm\color{#c00}{expt} \bmod 6,,$ valid by $,2^{\large 6}\equiv 64\equiv 1\pmod {!63}\ \ $ – Bill Dubuque May 12 '19 at 19:39
  • 1
    @jonnyWoox Alternatively $\large \bmod \color{#0a0}6!:,\ 4^{\large 2}\equiv 4,\Rightarrow, \color{#c00}{4^{\large K}!\equiv 4}\ $ by induction. $\ \ $ – Bill Dubuque May 12 '19 at 20:05
  • I think that I've understood all, it is very interesting observation @Bill - thanks a lot! – jonnyWoox May 12 '19 at 20:20
  • @jonnyWoox You can find many similar worked examples here, some simpler than this. – Bill Dubuque May 12 '19 at 20:26
  • I have one more question - why have you extracted $6$ and in which way $2^{2K}$ at top transformed into $4$? At the top we have $\mod 63$ and at down we have $\mod 6$ - why? – jonnyWoox May 13 '19 at 21:23
  • @jon $\large !!\bmod 63!:\ 2^{\large\color{#0a0} 6}!\equiv 1,\Rightarrow, 2^{\large \color{#c00}N}!\equiv 2^{\large \color{#c00}N\bmod\color{#0a0}6}\equiv 2^{\large \color{#c00}4}\ $ by modular exponent reduction. – Bill Dubuque May 13 '19 at 21:31
  • And $,2^{\large 2N}! = (2^{\large 2})^{\large N}!= 4^{\large N}\ \ $ – Bill Dubuque May 13 '19 at 21:31
  • I know but why you calculated $2^{2K} \mod 6$ and not $\mod 63$? – jonnyWoox May 13 '19 at 22:05
  • @jon We're reducing the numerator $!\bmod 63$ in the first bracketed expression in my answer, i.e. $$\large \bmod 63!:\ 2^{\Large\color{#0a0}6}\equiv 1,\Rightarrow, 2^{\Large \color{#c00}{2^{\Large 2K}}}!!\equiv 2^{\Large \color{#c00}{2^{\Large 2K}}!\bmod \color{#0a0}6}!\equiv 2^{\Large\color{#c00}4}\qquad\qquad $$ i.e. we have $\ \color{#c00}{N = 2^{\large 2K}}\ $ in my 2nd last comment. – Bill Dubuque May 13 '19 at 22:16