$3^{123} \mod 100$

Aug 23 2020

Die Frage:


Bewerten $3^{123}\mod 100$


Mein Versuch


Also habe ich zunächst versucht, die Potenzen von 3 aufzulisten und ein Muster der letzten beiden Ziffern zu finden - was trotz sehr schmerzhafter Inspektion kein offensichtlich nützliches Muster ergab.

Also habe ich versucht, dies zu vereinfachen und Eulers Verallgemeinerung des Satzes von Fermat zu verwenden, um dies zu lösen:

Der Satz besagt: $a^{\phi(n)} \equiv 1 \pmod{n}$

Damit:

$3^{123}\mod 100$

= $3^{41^3}\mod 100$

= $(3^{40} \times 3^1)^3\mod 100$

I think I'm ok up to that point. Now, $\phi(100) = 40$

So am I right in the following?

$(3^{40} \times 3^1)^3\mod 100$ $\cong$ $(1 \times 3^1)^3\mod 100$

= $3^3\mod 100$

= 27.

Am I correct?


Thanks!


Antworten

2 OscarLanzi Aug 23 2020 at 08:48

You are indeed correct. There is, however, one minor improvement. Using the Carmichael function, you can argue that a smaller power of $3$, namely $3^{\lambda(100)}=3^{20}\equiv 1\bmod 100$. The Carmichael function of divides half the Euler totient function when the argument is even and the Euler totient is a multiple of $4$, which is true for $\lambda(100)$; thus $3^{20}$ can replace $3^{40}$ in the argument.

At a more elementary level, you can render $3^4=80+1$ and raise both sides to the fifth power, thus $3^{20}\equiv1\bmod 100$ as the Binomial Theorem for $(80+1)^5$ gives multiples of $100$ plus $1$.

1 RezhaAdrianTanuharja Aug 23 2020 at 08:47

Correct, an alternative solution:

$$ \begin{align} 3^{123}&=\left(3^{2}\right)^{61}\cdot 3\\ &=\left(10-1\right)^{61}\cdot 3\\ &\equiv\left(\binom{61}{1}10^{1}\left(-1\right)^{60}-1\right)\cdot 3 &\mod{100}\\ &\equiv 27 &\mod100 \end{align} $$

global05 Aug 23 2020 at 08:34

Correct! I believe your logic does hold correctly. As far as I can see this is a correct application of Euler's generalisation of Fermat's Theorem. $\phi(100) = 40$ and thus $3^{40} \cong 1 \mod 100$

If you need further convincing, simply input $3^{123}$ into https://www.calculatorsoup.com/calculators/algebra/large-exponent-calculator.php.

Again, not really needed, but if you needed concrete proof, there it is.

CopyPasteIt Aug 25 2020 at 06:48

The OP began by looking for a pattern but stated that

...despite much painful inspection did not yield an obvious useful pattern.

You can use some light theory to actually predict the form and structure of the pattern.

Observe that if $a \in \{0,2,4,6,8\}$ and $b \in \{1,3,7,9\}$ and

$\quad 3 \times (10 a + b) \equiv 10 \,a' + b' \pmod{100} \text{ with } a',b' \in \{0,1,2,3,4,5,6,7,8,9\}$

then in fact $a' \in \{0,2,4,6,8\}$ and $b' \in \{1,3,7,9\}$.

This is our main (theoretical) pattern and

$\quad 3^1 \equiv 03 \pmod{100}$
$\quad 3^2 \equiv 09 \pmod{100}$
$\quad 3^3 \equiv 27 \pmod{100}$
$\quad 3^4 \equiv 81 \pmod{100}$
$\quad\text{-------------------------}$
$\quad 3^5 \equiv 43 \pmod{100}$

It easy to verify that the units digit will move

$\quad 3 \mapsto 9 \mapsto 7 \mapsto 1$

inside each of these four cycles.

Considering that $3$ is a unit, we can argue that one of these $4$-cycles will end on

$$\quad 01 \quad \text{the multiplicative identify}$$

and that no repetition is possible until the identify is reached.

Since the tens digit can only cycle over the set $\{0,2,4,6,8\}$, there are at most five of these $4$-cycles that have to be calculated.

Calculating the $2^{nd}$ $4$-cycle:

$\quad 3^5 \equiv 43 \pmod{100}$
$\quad 3^6 \equiv 29 \pmod{100}$
$\quad 3^7 \equiv 87 \pmod{100}$
$\quad 3^8 \equiv 61 \pmod{100}$
$\quad\text{-------------------------}$

Calculating the $3^{rd}$ $4$-cycle:

$\quad 3^9 \equiv 83 \pmod{100}$
$\quad 3^{10} \equiv 49 \pmod{100}$
$\quad 3^{11} \equiv 47 \pmod{100}$
$\quad 3^{12} \equiv 41 \pmod{100}$
$\quad\text{-------------------------}$

Calculating the $4^{th}$ $4$-cycle:

$\quad 3^{13} \equiv 23 \pmod{100}$
$\quad 3^{14} \equiv 69 \pmod{100}$
$\quad 3^{15} \equiv 07 \pmod{100}$
$\quad 3^{16} \equiv 21 \pmod{100}$
$\quad\text{-------------------------}$

At this point we really don't have to calculate the $5^{th}$ $4$-cycle since we know it has to be the last one.

We can now use the fact that

$\tag 1 3^{20} \equiv 1 \pmod{100}$

and work out the remaining details for the OP's question.