3

Calculate without a calculator: $$\left [ 3 \right ]^{2014^{2014}}\mod 98$$

I know I have to use Euler's Theorem. As a hint it says I might need to use the Chinese Remainder theorem too. I know how both of these work theoretically.

For example I can calculate $5^{256} \mod 13$ with Euler's Theorem. But these large numbers throw me off, especially the double power of 2014.

I started of like this for the Chinese Remainder: $$98 = 2*7^{2}\\ \left [3 \right ]^{2014^{2014}} \mod 2 \\ \left [3 \right ]^{2014^{2014}} \mod 49 \\$$

Now calculate both: $$\left [3 \right ]^{2014^{2014}\mod \phi_{(2)} = 2} \equiv \left [3 \right ]^{0} \equiv 1 \mod 2$$ That was lucky. I fail at mod 49.

Applying Euler's Theorem on 2014^2014 (since ([3]^2014)^2014 seems even more impossible) gives the following:

$$\phi _{(49)} = 42\\ 2014 = 47*42+40\\ 2014^{2014} = 2014^{42^{47}}*2014^{40}\equiv 2014^{40} \mod 49$$

(That doesn't really work without a calculator either.) And what now, applying Euler's Theorem again doesn't work, and I can't do it in my head either.

Is my approach right? Did I do something wrong?

Please point me in the right direction. I'm also open to entirely different solutions.

1 Answers1

2

It seems you are mixing exponents and base numbers and what is to be calculated modulo $49$, and what is to be calculated modulo $42$. This is, in my opinion, the chief difficulty working with problems like this, and it's important to use the utmost care that you actually calculate the correct power in the correct modulus.

We want to know $3^{2014^{2014}} \pmod{98}$. Using the chinese remainder theorem, and the fact that the number is obviously odd, we now have left to calculate $3^{2014^{2014}} \pmod{49}$. In order to do that, we use Euler's theorem and try to figure out $2014^{2014} \pmod{42}$.

First of all, the reduction $2014 \equiv -2 \pmod {42}$ makes this a bit simpler. That means, in order to use Euler's theorem to calculate the power of $3$ modulo $49$, we don't need to bother with powers of $2014$ modulo $42$, it's enough to consider powers of $-2$.

Now, we want $(-2)^{2014} \pmod{42}$. Using the Chinese remainder theorem, we want to know $(-2)^{2014}$ modulo $7$, $3$ and $2$. Modulo $2$ and $3$ are easy, as $(-2)$ is congruent to $0$ and $1$, respectively.

Modulo $7$ we have Euler's theorem again, with $\phi(7) = 6$ and $2014 = 2010 + 4$, so $(-2)^{2014} \equiv (-2)^4 = 16 \pmod{7}$. We also see that $16 \equiv 1\pmod 3$ and $16\equiv 0\pmod 2$, so we must have $(-2)^{2014} \equiv 16 \pmod{42}$.

Going back to the base, this means that $$3^{2014^{2014}} \equiv 3^{(-2)^{2014}} \equiv 3^{16} \pmod{49}$$ So all that's left now is to calculate $3^{16} \pmod{49}$. This might be done by repeated squaring: $3^{16} = (((3^2)^2)^2)^2$. We have $$ 3^{16} = 9^8 = 81^4 \equiv (-17)^4 = 289^2 \equiv (-5)^2 = 25 \pmod{49} $$ So to get back to the original question, we know that $$ 3^{2014^{2014}} \equiv \cases{1 \pmod 2\\ 25\pmod{49}} $$ which means that it's congruent to $25$ modulo $98$.

Arthur
  • 199,419
  • Thank you for your detailed description, I will look into it tomorrow and report back! – Lorenz Leitner Apr 30 '15 at 20:34
  • How can you use Euler's theorem with -2 and 42? They're not co-prime. In fact, (-2)^12 = 22 mod 42. Am I misunderstanding your argument? – rwilsker Apr 30 '15 at 21:28
  • @rwilsker It is now corrected. The same answer stands. – Arthur May 01 '15 at 16:47
  • How do you get Modulo 2 and 3 so easily? ("as (−2) is congruent to 0 and 1"). Do you just do (-2) mod 2 and mod 3, ignoring the power 2014? And afterwards, for ϕ(7)=6 and 2014=2010+4, you see that easily that 6 divides 2010? – Lorenz Leitner May 01 '15 at 17:31
  • 1
    @CGuy Well, I first do $-2 \equiv 0 \pmod 2$ and from there it follows that $(-2)^{2014} \equiv 0^{2014} =0\pmod 2$. Same for modulo $3$, only in this case it's $1^{2014} \equiv 1 \pmod 3$. And yes, I see easily that $6$ divides $2010$, since both $2$ and $3$ do so. $2$ because $2010$ ends in an even digit ($0$). $3$ because $3$ divides $2+0+1+0 = 3$. Divisibility by $2$ and $3$ at the same time implies divisibility by $6$. – Arthur May 01 '15 at 18:41
  • It's clear now, thank you very much. – Lorenz Leitner May 01 '15 at 19:00