1

Problem

Finding the last two digits of a base with a large exponent: $237^{222222212202}$.

Method

  1. If the number ends on 1:
    • the the second last digit is the second last base digit times the last exponent digit
    • the last digit is 1
  2. If the number ends on odd:
    • rewrite it until it is a number that ends on one and the first rule can be used $((n^4)^{e/4})$
  3. If the number ends on an even number:
    • $..76^{n} = ..76$
    • $..24^{n} = $ ..76 for even $n$ and 24 for uneven $n$
    • $..2^{10} = ..24$

Solution

$$(7^4)^{55555553050}\cdot 7^2 = (2401)^{..0} \cdot 7^2 = ..01 \cdot 7^2 = 49$$

Question

  • Is this method correct / could it be improved?
  • Is there an easier method?
  • Can someone please take my example and demonstrate it with Euler and explain it?

Thank you so much!

Bill Dubuque
  • 272,048
  • Welcome to Mathematics Stack Exchange. I got $69$, using $37$, not $7$ – J. W. Tanner Apr 02 '20 at 21:38
  • are you familiar with congruence? – Arnaldo Apr 02 '20 at 21:39
  • @Arnaldo yeah, that is modulo calculation, right? –  Apr 02 '20 at 21:40
  • 1
    Right, so you're essentially asking for $237^{222222212202}\mod 100$ – J. W. Tanner Apr 02 '20 at 21:42
  • Are you familiar with Eulers formula? That $\phi(100) = 40$ and so $237^{40}\equiv 1\pmod {100}$? The last two digits will cycle in a pattern the pattern will repeat every $40$ times. But to know that, you have to know Euler's formula. If you don't just try powering $237$ until you get the pattern. – fleablood Apr 02 '20 at 22:05
  • @fleablood I've seen Euler's formula a lot. But I don't get it. What is that phi and why do we use 100? –  Apr 03 '20 at 01:08
  • @HeinrichJensen: Euler’s theorem is $a^{\phi(n)}\equiv1\pmod n$ if $\gcd(a,n)=1$ – J. W. Tanner Apr 03 '20 at 03:08
  • I don't mean Eulers equation, $e^{\pi i}=-1$. I mean Eulers formula that if $a$ and $n$ are relatively prime and $\phi(n)$ is the number of positive integers less than $n$ that are relatively prime to $n$, then $a^{\phi(n)} \equiv 1 \mod n$. So as there are $40$ numbers between $1$ and $100$ that are relatively prime to $100$ then $237^{40}\equiv 1\pmod{100}$ and the last to digits of $237^{40}$ are $01$. And so the last two digits of $237^{222222212200}$ are $01$ (because $40|222222212200$) and the last to digits of $237^{222222212202}$ is the last two digits of $37^2$. – fleablood Apr 03 '20 at 04:30
  • The trick is to realize the last digit (or the last two digits) cycle. It's easy by trial and error to see that the last digit of $7^4$ is $1$ so the last digit of $7^{4m}$ is always $1$ So the last digit of $237^{4M + 2}$ the last digit of $7^2$ is $9$... But for the last two digits the cycle isn't $4$ long it is $20$ long. But I can't think of any easy way to figure that out be trial and error. – fleablood Apr 03 '20 at 04:37
  • Oops. You are right. My result is Euler's THEOREM. Euler's formula is usually the equation $e^{\pi i} = -1$ (but sometimes it is that for a polyhedron The number of Faces + the number of edges - the number of Vertices = 2). – fleablood Apr 03 '20 at 04:42

2 Answers2

3

Hints to compute $237^{222222212202}\mod 100$:

If $a\equiv b \mod 100$ then $a^n\equiv b^n\bmod 100$.

$a^{20}\equiv1\mod 100$ if $a$ is relatively prime to $100$.

J. W. Tanner
  • 60,406
1

There is a very simple way to go about this, you basically want to evaluate $237^{222222212202}\bmod 100$. Now in any group $G$ with $n$ elements, we have $g^n = 1$ for all $g$. Thus if we look at your number as a member of the group $(\mathbb Z/100\mathbb Z)^\times$, we get that $$237^{222222212202}=(237^{100})^{2222222122}\cdot 237^2 = 1^{2222222122}\cdot 237^2 = 237^2,$$ thus you just need to look at the last two digits of $237^2$, which are $69$.

Luke Collins
  • 8,748