3

Suppose we want the last two digits of $3^{250}$, one can use the theorem $a^{\phi(n)}\cong 1(\mod n)$ whenever $(3,n)=1$. But instead, if i have $2^{250}$, how do i solve this problem, because here $(2,100)\neq 1$.

notation $(a,b)=$the gcd of $a$ and $b$

David
  • 4,201

3 Answers3

3

As $(2^{250},100)=2^2,\left(2^{250-2},\dfrac{100}{2^2}\right)=1$

Let us find $2^{248}\pmod{25}$

As $(2,25)=1$ and $\phi(25)=20,2^{20}\equiv1\pmod{25}$ and $248\equiv8\pmod{20}$

$\implies2^{248}\equiv2^8\pmod{25}\equiv6$ as $2^8=256$

$\implies2^{248}\cdot2^2\equiv6\cdot2^2\pmod{25\cdot2^2}$

Done!

2

Well, the last two digits are divisible for $4$, so

$$2^{250}\equiv 4a \pmod{100}\iff 2^{248}\equiv a \pmod{25}$$

and $(2,25)=1$

Aditya Hase
  • 8,851
Exodd
  • 10,844
  • 1
    Is this true for every number other than 2?@Exodd – David Nov 22 '14 at 00:49
  • @David there's a more general rule: if you're trying to evaluate $a$ modulus $n$, and $(a,n)=b$, then the result will be a multiple of $b$, and you can divide $$a\equiv c ;(mod; n) \iff a/b\equiv c/b ;(mod; n/b)$$ – Exodd Nov 22 '14 at 18:25
2

Nowhere near as neat as Exodd's solution but I thought I'd post this because I think it gives a handy insight into the behaviour of some powers of $2$ modulo $100$.

I exploited the fact that $2^{14} = 16384 \equiv -16 = -2^4 \pmod{100}$ and $2^{16} = 65536 \equiv -64 = -2^6 \pmod{100}$, giving $2^{30} = 2^{14} \cdot 2^{16} \equiv (-2^4)\cdot (-2^6) = 2^{10} \pmod{100}$.

So $2^{250} = 2^{30\cdot 8 + 10} \equiv (2^{10})^8\cdot 2^{10} = 2^{90} = (2^{30})^3 \equiv (2^{10})^3 = 2^{30} \equiv 2^{10} = 1024 \equiv 24 \pmod{100}$.

As I said, not as elegant, and perhaps not very general, but I put it down here in case it gives the original asker or others a little more insight.

Deepak
  • 26,801
  • 1
    There is a general observation that since there are only finitely many numbers modulo $n,$ if we keep multiplying by a fixed constant $k$ then eventually we will start repeating. – David K Nov 22 '14 at 03:36