2

Find the remainder when $ 5^{(5^{31})} $ is divided by $ 17 $.

So I know that by applying the Fermat's little theorem, we have $ 5^{17-1}=5^{16}\equiv 1\pmod {17} $. But from here, how should I proceed and find the correct answer?

  • 2
    Welcome to Mathematics Stack Exchange. What is $5^{31}\bmod 16$? – J. W. Tanner Dec 19 '22 at 21:08
  • I do not know. How should I calculate $ 5^{31}\pmod {16} $? May you please tell me? –  Dec 19 '22 at 21:15
  • What is $5^{4}\bmod16$? – J. W. Tanner Dec 19 '22 at 21:15
  • By applying Euler's theorem (If $ a $ and $ n $ are coprime positive integers and $ \varphi(n) $ is Euler's totient function, then $ a^{\varphi(n)}\equiv 1\pmod {n} $, we have $ 5^{\varphi(16)}=5^{8}=(5^{4})^{2}\equiv 1\pmod {16} $. Thus $ 5^{4}\equiv 1\pmod {16} $. Is this correct? If so, then how can this help me to find the correct answer? –  Dec 19 '22 at 21:25
  • You are correct that $5^4\equiv1\bmod16$, although your reasoning didn’t rule out $-1$ Anyway, $5^{31}=(5^4)^7 5^3$ – J. W. Tanner Dec 19 '22 at 21:33
  • So $ 5^{31}=(5^{4})^{7}\cdot 5^{3}\equiv 1^{7}\cdot 125\equiv 125\equiv 13\pmod {16} $? If so, then how should I proceed from here and find the correct answer? –  Dec 19 '22 at 21:38
  • Yes, $5^{31}\equiv13\bmod16$, so $5^{5^{31}}\equiv5^{13}\bmod17$. By the way, can you compute $5^4\bmod16$ knowing that $5^2=25\equiv9\bmod16$? – J. W. Tanner Dec 19 '22 at 21:55
  • 1
    Since $ 5^{2}=25\equiv 9\pmod {16} $, it follows that $ 5^{4}=(5^{2})^{2}\equiv 9^{2}\pmod {16}\equiv 81\pmod {16}\equiv 1\pmod {16} $. –  Dec 19 '22 at 22:02
  • 1
    Yes. I have figured it out. Thank you for the help, J. W. Tanner and David Clyde. –  Dec 20 '22 at 01:55

0 Answers0