2
$\begingroup$

I've looked at some other related things on here, but this seems a little more complicated with the double exponentiation. Is there a general algorithm to calculate $a^{c_1^{c_2^{...^{c_n}}}} \mod p$ or something?

$\endgroup$
3
  • 1
    $\begingroup$ Have you heard of Euler's theorem? $\endgroup$
    – Arthur
    Jun 18, 2016 at 8:29
  • $\begingroup$ @Arthur I'll look into it, I'm only a beginner in math, so this is the first time I hear about it, thanks $\endgroup$
    – Pavel
    Jun 18, 2016 at 8:30
  • 1
    $\begingroup$ See here and the scores of questions linked to that umbrella question. I would vote to close this as a dupe, but have promised not to do that. $\endgroup$ Apr 1, 2018 at 7:48

4 Answers 4

2
$\begingroup$

$$\phi(67)=66=2\cdot 3\cdot 11$$ and

By Fermat's Theorem, $$47^{51}\equiv47^{1}\equiv 47\pmod2$$ $$47^{51}\equiv47^{1}\equiv 47\pmod3$$ $$47^{51}\equiv47^{1}\equiv 47\pmod {11}$$

Thus, using Chinese Remainder $$47^{51}\equiv 47\pmod {66}$$

Thus, by Fermat' Little theorem: $$9^{47^{51}}\equiv 9^{47}\equiv 3^{94}\equiv 3^{28}\equiv (-64)^{28}\equiv ((-4)^3)^{28}\equiv (-4)^{84}\equiv (-4)^{18}\equiv 4^{18}\equiv 2^{36}\equiv -2^3\equiv -8\pmod{67}$$ , where $2^{33}\equiv -1$ comes from the fact that $2^{33}=\left(\frac 2{67}\right)=(-1)^{\frac{p^2-1}8}$

$\endgroup$
2
$\begingroup$

First focus on $47^{51}$ in your example. You must figure that out mod $66$, the latter number being the Euler totient of $67$. Let $r$ be that residue and then attack $9^r$ modulo $67$.

$\endgroup$
2
$\begingroup$

$67$ is a prime number, thus, Fermat's Theorem holds.

This implies

$$9^{66}=1 \pmod {67} $$ you should resolve now $$ 47^{51} = ? \pmod {66} $$

Consider that $66 = 2\cdot3\cdot11$, you can use the Chinese Remainder Theorem.

$\endgroup$
3
  • $\begingroup$ Please put braces around $51$ in $47^{51}$. :-) $\endgroup$ Jun 18, 2016 at 8:32
  • $\begingroup$ Yes, I was editing $\endgroup$ Jun 18, 2016 at 8:34
  • 1
    $\begingroup$ Please check my edit to see a lot of nice features of latex :) $\endgroup$
    – Emre
    Jun 18, 2016 at 8:34
2
$\begingroup$

First of all, $$9^{47^{51}}=3^{2\cdot47^{51}}$$

As $\phi(67)=\lambda(67)=66,$ $$3^{2\cdot47^{51}}\equiv3^{2\cdot47^{51}\pmod{66}}\pmod{67}$$

As $(2\cdot47^{51},66)=2,$ let us find $47^{51}\pmod{33}$

As $\lambda(33)=\cdots=10,51\equiv1\pmod{10},$

$$47^{51}\equiv47^1\pmod{33}\equiv14$$

$$\implies2\cdot47^{51}\equiv14\cdot2\pmod{66}$$

$$\implies3^{2\cdot47^{51}}\equiv3^{28}\pmod{67}$$

Now $3^4\equiv14,3^8=(3^4)^2\equiv14^2\equiv-5$

$\implies3^{28}=3^4\cdot(3^8)^3\equiv14\cdot(-5)^3\equiv14\cdot9\equiv-8\equiv-8+67$

$\endgroup$
5

Not the answer you're looking for? Browse other questions tagged .