3

Given any positive integer $n,$ let $\phi(n)$ be the number of positive integers less than or equal to $n$ that are relatively prime to $n.$ Find the last three digits of $\large\phi({3}^{2})^{\phi({4}^{2}){}^{\phi({5}^{2})^{.^{.^{.\phi(2019{}^{2})}}}}{}^{}}$

My attempts: I calculated Euler's totient functions separately by the formula $\phi(n)=n\big(1-\frac{1}{p_1}\big)\big(1-\frac{1}{p_2}\big)\cdots\big(1-\frac{1}{p_k}\big),$ and then I worked them with $\pmod{1000}.$ But it looks very tedious!

May be there some smart way to tackle this problem.

Any guidance would be highly appreciated.Thank you!

J. W. Tanner
  • 60,406
Debrogli
  • 338
  • 2
    Try calculating $\phi(3^2)$, $\phi(3^2)^{\phi(4^2)}$, $\phi(3^2)^{{\phi(4^2)}^{\phi(5^2)}}$, etc., $\pmod{1000}$ – J. W. Tanner Mar 21 '24 at 11:09
  • 1
    I'd rather begin with finding the eventual period of the powers $\bmod{1000}$ of $\phi(3^2)=6$, hence the period of the powers $\bmod{125}$ of $6$. – Anne Bauval Mar 21 '24 at 11:22
  • We know that $\phi(3^2) = 6$ and also $\phi(n^2) = n \cdot \phi(n)$. If we look modulo 1000 we can just as well look mod 8 and mod 125 by the Chinese remainder theorem. Logically, the number evaluates to be $0 \bmod 8$, thus the last three digits are divisible by 8. – jorisperrenet Mar 21 '24 at 11:29

4 Answers4

1

$\phi(3^2)=\phi(9)=6; \phi(4^2)=\phi(16)=8; $ and $\phi(5^2)=\phi(25)=20$.

Can you show (using the Chinese remainder theorem) that $8^{20}\equiv176\bmod400$

and the same holds for $8^{20m}$, and that $6^{176}\equiv256\bmod1000$?

(For the last congruence, it helps to know that $6^{25}\equiv1\bmod{125}$.)

J. W. Tanner
  • 60,406
1

We find that $\phi(3^2) = 6$, $\phi(4^2) = 8$, and $\phi(5^2) = 20$. Also, we need that $\phi(n^2) > 0$ for $3 \leq n \leq 2019$, which is naturally true.

Also define the number $n$ to be $\large\phi({3}^{2})^{\phi({4}^{2}){}^{\phi({5}^{2})^{.^{.^{.\phi(2019{}^{2})}}}}{}^{}}$.

We want to know $n \bmod {1000}$. To do this we split the question up into two parts $n \bmod 8$ and $n \bmod {125}$ and combine these answers using the Chinese Remainder Theorem.

For the first part note that $n \equiv 6^{8^{\cdot^{\cdot^{\cdot}}}} \equiv 2^{8^{\cdot^{\cdot^{\cdot}}}} \cdot 3^{8^{\cdot^{\cdot^{\cdot}}}} \equiv 0 \pmod 8$.

For the second part we know from Euler's theorem that $n \equiv 6^{8^{20^{\cdot^{\cdot^{\cdot}}}}} \equiv 6^{8^{20^{\cdot^{\cdot^{\cdot}}}} \bmod {100}} \pmod {125}$. Note that $8^{20^{\cdot^{\cdot^{\cdot}}}} \pmod {100}$ can again be split up into two parts modulo $4$ and modulo $25$. Logically, $8^{20^{\cdot^{\cdot^{\cdot}}}} \equiv 0 \pmod {4}$. Also, applying Euler's theorem again, $8^{20^{\cdot^{\cdot^{\cdot}}}} \equiv 8^{20^{\cdot^{\cdot^{\cdot}}} \bmod {20}} \equiv 1 \pmod {25}$. The Chinese remainder theorem thus gives that $8^{20^{\cdot^{\cdot^{\cdot}}}} \equiv 76 \pmod {100}$. We get $$n \equiv 6^{8^{20^{\cdot^{\cdot^{\cdot}}}}} \equiv 6^{8^{20^{\cdot^{\cdot^{\cdot}}}} \bmod {100}} \equiv 6^{76} \equiv 6 \pmod {125}.$$

From the Chinese remainder theorem we get $n \equiv 256 \pmod {1000}$.

  • Why we need to evaluate only $6^{8^{20}}=256$ please. Anyway we have $6^{8^{20^{12}}}\equiv376\pmod{1000}$ and $376\ne256$ – Piquito Mar 21 '24 at 15:40
  • @Piquito, I did not mean to only evaluate $6^{8^{20}}$, that would be a weird assumption. I meant evaluating only the totients of $3^2, 4^2$, and $5^2$. I'll change it in the answer to avoid confusion. – jorisperrenet Mar 21 '24 at 15:57
  • Thanks you very much. I confess that I do not see clearly and I fear the possibility that a common error has been leaked such as $a^{b^c}=a^{(b^c)}\ne (a^b)^c$. Regards. – Piquito Mar 21 '24 at 16:12
  • @Piquito: $6^{8^{{20}^{12}}}\equiv256\bmod1000$ – J. W. Tanner Mar 21 '24 at 16:45
0

As announced in comments, let us begin with finding an eventual period of the powers $\bmod{1000}$ of $\phi(3^2)=6$, hence a period of the powers $\bmod{125}$ of $6$. The smallest solution, $25$, is given by the binomial formula: $6^{25}=(1+5)^{25}\equiv1\bmod{125}$. (Note that we never use that $\varphi(125)=100$.)

A period of the powers $\bmod{25}$ of $\phi(4^2)=8$ being $a:=\phi(25)=\phi(5^2)$, which is precisely the next nested exponent, we stop, set $$m:=\large\phi(6^2)^{\phi(7^2){}^{\phi(8^2)^{.^{.^{.\phi(2019{}^{2})}}}}{}^{}},$$ and calculate backwards: $$\phi(5^2)^m=ab$$ (with $b:=a^{m-1}$).

$\bmod{25},\;\phi(4^2)^{ab}=8^{ab}\equiv1^b=1$

hence $$\phi(4^2)^{ab}=25c+1.$$

$\phi(3^2)^{25c+1}=6^{25c+1}\equiv\begin{cases}6\bmod{125}\\0\bmod8,\end{cases}$

hence $$\phi(3^2)^{25c+1}\equiv256\bmod{1000}.$$

Anne Bauval
  • 34,650
0

$\,\ 6\equiv_5 1\overset{(\ \ )^{\large 5}}\Rightarrow 6^5\equiv_{25} 1\overset{(\ \ )^{\large 5}}\Rightarrow 6^{\large \color{darkorange}{25}}\equiv_{125}1\,$ by $\mu$LTE, so by the mod distributive law we have

$\!\begin{align} \bmod 1000\!:&\ \ 6^{\:\!\Large\color{#c00}{8^{\LARGE 20i}}}\!\!\! \equiv 8 \!\left[\dfrac{6^{\large \color{darkorange}{76}}}{\color{#0a0}8}\!{\small \bmod} 125\right]\!\equiv 8[\color{#0a0}{32}],\ \, {\rm by} \ \ {\small {\frac{6^{\large \color{darkorange}1}}{\color{#0a0}8\ \ }}\equiv \frac{3}4\equiv\frac{128}4}\equiv 32\!\!\!\pmod{\!125}\\[.2em] {\rm by} \bmod\!\!\underbrace{100}_{^{\Large\phi(\color{125}{125})}}\!\!\!:&\ \ \ \color{#c00}{8^{\large 20i}}\! \equiv 4\!\!\underbrace{\left[\color{#0af}{\frac{8^{20i}}4}\!{\small \bmod} 25\right]}_{{\large \color{#0af}{8^{\large 20}\equiv_{25}1}}\ \text{by }\,\phi(25)=20\!\!}\!\!\! \equiv\color{darkorange}{76},\ \ {\rm by} \ \ {\small \color{#0af}{\frac{1}4}\equiv \frac{-24}4\equiv}\, {-6}\equiv 19\!\!\!\pmod{\!25}\\[.2em] \end{align}$

Bill Dubuque
  • 272,048