0

Find the remainder of $3^{333}$ divided by $100$

So I can find that $100=2^2\cdot 5^2$

Then I want to find $3^{333}$ mod $4$ and mod $25$ and use chinese remainder theorem to find a solution mod $100$.

I can find that $3^{333}\equiv (-1)$ mod $4$

But then $3^{333}=((3^3)^3)^{37}\equiv (27^3)^{37}\equiv (2^3)^{37}\equiv 8^{37}$ mod $25$

But I cannot find $8^{37}$ mod $25$

  • https://en.wikipedia.org/wiki/Euler%27s_theorem and https://en.wikipedia.org/wiki/Exponentiation_by_squaring – WhatsUp Mar 20 '20 at 20:57
  • @WhatsUp I can see I can reduce it to $3^{320}\times 3^{13}\equiv 3^{13}$ mod $100$, but not sure what I do with $3^{13}$ – AColoredReptile Mar 20 '20 at 21:01
  • You used the first link I gave. Now use the second one. – WhatsUp Mar 20 '20 at 21:02
  • $3^{20}=3 486 784 401\equiv 1 \text{ mod }100$. Just a little hint :) –  Mar 20 '20 at 21:03
  • On a more simple approach, making a table will take some time, but it doesn't let you down: $3^1$ and $3^{21}$ have the same remainder of $3$ when dividing by $100$. To extend it to the power $333$ is mere artihmatic – imranfat Mar 20 '20 at 21:08
  • 2
    Hint $\large\ 3^{333} = 3(-1+10)^{166} =,\ldots$ (Binomial Theorem, only first two terms survive $\bmod 100$) – Bill Dubuque Mar 20 '20 at 21:11
  • @imranfat Why does $3^{21}$ have remainder $3$? Shouldn't $3^{41}$ be the smallest power that has remainder $3$? – AColoredReptile Mar 20 '20 at 21:11
  • Because $3^{21}=10460353203$ – imranfat Mar 20 '20 at 21:15
  • @imranfat Besides computing it? – AColoredReptile Mar 20 '20 at 21:19
  • @AColoredReptile $40$ is the cardinality of the multiplicative group of integers $\pmod{100}$, so the order of $3$ in it is a divisor of $40$ by Lagrange's theorem. It turns out to be $20$ and I don't think there is an easy way to know besides computation – Evariste Mar 20 '20 at 21:19
  • @Evariste Ok, but if I could compute $3^{21}$ I could compute $8^{37}$ so I kind of view that as being the same problem. – AColoredReptile Mar 20 '20 at 21:22
  • @AColoredReptile Well in most cases you're going to need to compute a little bit. You started well by reducing to the case of powers of $2$ as they are easy to compute. Just compute the powers until you get something close enough to a multiple of $25$ like I did and then the calculation becomes easy. $1,2,4,8,16,32,64,128,256,512,1024$ takes split seconds to compute and $1024$ is obviously pretty close to being a multiple of $25$. I wouldn't recommend trying to find which powers of $3$ reduces to $1$ as it takes a long time. Just try to reduce the exponent by computing intermediary steps – Evariste Mar 20 '20 at 21:24
  • $!!\large \bmod 25!:\ 3^{13}\equiv 3(\color{#c00}{3^3})^4 \equiv 3(\color{#c00}{2})^4 \equiv 23,,$ and already $\large ,23\equiv -1\pmod{!4}$ hence $23$ is the sought CRT solution (since the solution is unique $!\bmod 100$ by CRT). – Bill Dubuque Mar 20 '20 at 21:29
  • Modulo $100$ we have $3^4\equiv 81$,... so $3^8\equiv (3^4)^2\equiv 81^2\equiv 61$,.. so $3^{12}\equiv 3^8\cdot 3^4\equiv 61\cdot 81\equiv 41$,... so $3^{13}\equiv 3^{12}\cdot 3 \equiv 41\cdot 3 \equiv 23.$ – DanielWainfleet Mar 20 '20 at 21:37
  • "but not sure what I do with $3^{13}$". 1) If $3^{20}\equiv 1\pmod {25}$ then $3^{10}$ is most likely to be $\equiv \pm 1$. 2) If $3^{20}\equiv 1$ then $3^{13}\equiv 3^{-7}$. 3) multiple squaring should be intuitive. – fleablood Mar 20 '20 at 22:04

6 Answers6

1

We have $3^{333} \equiv 2^{111}\equiv1024^{11}\times2\equiv-2 \pmod{25}$ (note that I used your calculation for the first equality here and the well-known fact that $2^{10}=1024$)

So, if $x=3^{333}$, $x=-2+25k \equiv-2+k \equiv-1 \pmod4$

Hence $k \equiv1 \pmod 4$

Therefore $x=-2+25(1+4k')=23+100k' \equiv23 \pmod{100}$

Evariste
  • 2,511
1

$3^{333}$ being divided by 100.

$=(3^9)^{37}$

$=19683^{37}$

$=(19700-17)^{37}$

$\equiv -17^{37} \quad \bmod 100$

$-17^{37} =-17(17^{36})=-17(300-11)^{18}$

$\equiv -17(11^{18}) \quad \bmod 100$

$-17(11^{18})=-17((1300+31)^6)$

$\equiv -17(31^6) \quad \bmod 100$

$-17(31^6)=-17(1000-39)^3$

$\equiv -17 \cdot -39^3 \quad \bmod 100$

$17 \cdot 39^3=17 \cdot 39 \cdot (1500+21)$

$=(700-37)(1500+21)$

And after all the work $-37 \cdot 21=-777 \equiv -77 (\bmod 100)$

But if the answer had to be positive then $100-77=\boxed{23}$

0

So you need, as you noted, $3^{13}\pmod {100}$. Try successive squaring. $3^2=9,3^4=9^2=81,3^8=81^2=(-19)^2=61, 3^{12}=3^4\cdot3^8=81\cdot61=41,3^{13}=3\cdot41=23\pmod{100}$.

0

Use the totient function. $2$ and $5$ are distinct primes so $\phi(100)=\phi(2^25^2)=\phi(2^2)\phi(5^2)=[2(2-1)][5(5-1)]=40.$

Now since $\gcd(3,100)=1$ we have $1\equiv 3^{\phi(100)}\equiv 3^{40} \mod 100.$

Therefore $3^{333}\equiv (3^{40})^8\cdot 3^{13}\equiv (1)^8\cdot 3^{13}\equiv 3^{13} \mod 100.$

To finish, see my comment to the Q.

0

$4\mid 100\:$ & $\:4\mid \color{#90f}{3^{333}}\!+1\,$ (by $\bmod 4\!:\ 3^{333}\!+1\equiv (-1)^{333}\!+1\equiv -1+1\equiv 0),\,$ so

using $\ ab\bmod ac = a\,(b\bmod c) = $ mod Distributive Law to factor out $\,a = 4$

$3^{\large 333}\!+\!1\bmod 100 = 4\left[\dfrac{\color{#90f}{3^{\large 333}}\!+\!1}4\bmod 25\right] = 4\left[\dfrac{\color{#90f}{23}\!+\!1}4\bmod 25\right] = 4[6],\ $ by

$\!\bmod 25\!:\,\ \color{#c00}{3^{\large 20}\equiv 1}\ \Rightarrow\ \color{#90f}{3^{\large 333}}\equiv \underbrace{3(\color{#0a0}{3^{\large 3}})^{\large 4}(\color{#c00}{3^{\large 20}})^{\large 16}}_{\textstyle 3\,(\color{#0a0}2)^{\large 4}\,\color{#c00}1^{\large 16}}\equiv \color{#90f}{23},\,$ by $\rm\color{#c00}{Euler\ \phi(5^2)=4\cdot 5}$

Remark $ $ The computation of $\,\color{#90f}{3^{333}}\bmod 25\,$ in the prior line is a special case of the method of modular order reduction - the key to simplifying the computation of large modular powers.

As explained in the first link, the mod Distributive Law is an operational form of CRT. We can use the standard CRT formula along with the above computation mod $25$ to obtain the same result. In fact already $23\equiv -1\pmod{\!4}$ so we're done - we don't even need to apply the CRT formula.

Another quick way: $\, 3^{\large 333} = 3(-1+10)^{\large 166} =\,\ldots\,$ so expanding by Binomial Theorem shows only the first $2$ terms survive $\!\bmod 100 = 10^2$.

Bill Dubuque
  • 272,048
-1

Use Euler.

$\phi(25) = 20$ so $8^{20}\equiv 1 \pmod {25}$

So we need to figure out $8^{17}\equiv 8^{-3}$ which is which will be equivalent to $k^3$ where $k$ is the multiplicative inverse of $8$. $8*3=24\equiv -1$ so $8*(-3)\equiv 1 \pmod{25}$ and $8^{17} \equiv (-3)^3 \equiv -27\equiv -2\equiv 23 \pmod {25}$.

.....

Or back to the $3$

$3^{333}=3^{320}3^{13}\equiv 3^{13}\pmod {25}$.

As $3^{20}\equiv 1$ its a good guess that $3^{10} \equiv \pm 1$.

Many ways to do this but $3^{10} = 3^3*3^3*3^3*3\equiv 27*27*27*3\equiv 2*2*2*3\equiv 24 \equiv -1 \pmod {20}$. So $3^{13}\equiv -3^3\equiv -27\equiv -2 \equiv 23$.

.....OR.....

$100 = 10^2$

$3^2 = 10-1$

So $3^{10} = (10-1)^5\equiv 50-1$

$3^{20} \equiv (50-1)^2 \equiv 1\pmod {100}$.

So $3^{333}\equiv 3^{13}\equiv 3^{10}*3^{3}\equiv (50-1)*27\equiv 50*(26+1)-27\equiv 50 - 27 \equiv 23\pmod{100}$

fleablood
  • 124,253