# 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!

• Welcome to Mathematics Stack Exchange. I got $69$, using $37$, not $7$ Apr 2, 2020 at 21:38
• are you familiar with congruence? Apr 2, 2020 at 21:39
• @Arnaldo yeah, that is modulo calculation, right? Apr 2, 2020 at 21:40
• Right, so you're essentially asking for $237^{222222212202}\mod 100$ Apr 2, 2020 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. Apr 2, 2020 at 22:05

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$$.
• Shouldn't that be $a^{40}$, since $\varphi(100)=40$? Apr 2, 2020 at 21:46
• @LukeCollins: The Carmichael function of $100$ is $20$ Apr 2, 2020 at 21:47
• @JW Ah, I see, thanks. So $\lambda(100) \neq \varphi(100)$ since $(\mathbb Z/100\mathbb Z)^\times$ is not cyclic. Apr 2, 2020 at 21:49
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$$.