-3

We have $12^{12^{12}} \pmod{13}$. I tried solving it this way.

$12^{12^{12}} \equiv -1^{-1^{-1}} \pmod{13} = -1^{\frac{1}{-1}} = \frac{1}{-1} = -1$. But the correct answer is 1, why?

saner
  • 519
  • 4
    Instead, I will ask you: why should mod distribute over power towers? There is no reason why this should be the case. Consider as a simple example $2^3,\mathrm{mod},3=8,\mathrm{mod},3=2$, but $(2,\mathrm{mod},3)^{3,\mathrm{mod},3}=2^0=1$ – FShrike Dec 18 '21 at 16:23
  • $\bmod 13!:\ 12\equiv -1,$ so $,12^2\equiv (-1)^2\equiv 1,,$ so $,12^n\equiv 12^{n\bmod 2},$ by mod order reduction. That is the correct way to exploit the modular period of powers - see the linked dupe (and its links) – Bill Dubuque Dec 18 '21 at 17:08

1 Answers1

1

Since $12\equiv -1 \bmod 13$, for any odd exponent $12^{2n+1} \equiv -1 \bmod 13$ and for any even exponent $12^{2n} \equiv 1 \bmod 13$. You just have to see that the exponent in your expression must be even and you are done.

  • 1
    Please strive not to add more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Dec 18 '21 at 17:08
  • WADR, OP is confused about a tetration issue, which the linked "dupe" does not address. My response merely pointed out that in this instance the tetration issue which is impeding OP's access to an answer can be finessed. If I can respond to a question in a few seconds, why should I spend twenty minutes looking for possible dupes, when the best putative dupes that others can come up with are not even on point? – Keith Backman Dec 19 '21 at 20:58