Find the last Digit of $237^{1002}$?

3.4k Views Asked by At

I looked at alot of examples online and alot of videos on how to find the last digit But the thing with their videos/examples was that the base wasn't a huge number. What I mean by that is you can actually do the calculations in your head. But let's say we are dealing with a $3$ digit base Number... then how would I find the last digit.

Q: $237^{1002}$

EDIT: UNIVERSITY LEVEL QUESTION.

It would be more appreciated if you can help answer in different ways.

Since the Last digit is 7 -->

  • $7^1 = 7$
  • $7^2 = 49 = 9$
  • $7^3 = 343 = 3$
  • $7^4 = 2401 = 1$

    $.......$

    $........$

  • $7^9 = 40353607 = 7$

  • $7^{10} = 282475249 = 9$

Notice the Pattern of the last digit. $7,9,3,1,7,9,3,1...$The last digit repeats in pattern that is 4 digits long.

  • Remainder is 1 --> 7
  • Remainder is 2 --> 9
  • Remainder is 3 --> 3
  • Remainder is 0 --> 1

So, $237/4 = 59$ with the remainder of $1$ which refers to $7$. So the last digit has to be $7$.

9

There are 9 best solutions below

5
On

You want to know the last digit of $237^{1002}$, which is the same as the remainder of $237^{1002}$ after division by $10$. This calls for modular arithmetic. From $237\equiv7\pmod{10}$ it follows that $$237^{1002}\equiv7^{1002}\pmod{10}.$$ Now the base number is small; can you take it from here?

1
On

$$ 237^{1002} = (23*10 + 7)^{1002} = \sum_{i=0}^{1001}23^{1002-i}10^{1002-i}\;7^i{1002 \choose i} + 7^{1002} =\\ [\textit{some huge honking multiple of }10] + 7^{1002} = \\ [\textit{some huge honking multiple of } 10] + 49^{501} = \\ [\textit{some huge honking multiple of }10] + (50 - 1)^{501} =\\ [\textit{some huge honking multiple of }10] + [\textit{some other gorfurshlugging multiple of }10] + (-1)^{501} =\\ [\textit{some huge honking multiple of }10] + [\textit{some other gorfurshlugging multiple of }10] - 1 = \\ [\textit{some huge honking multiple of }10] + [\textit{one less than some other gorfurshlugging multiple of }10] + 9 $$

So the last digit is $9$. Thing is only the last digits matter, and the last digits will cycle between $1, 7, 9, 3, 1, 7, 9, 3$. So you just need the last digit and the remainder of $1002$ divided by $4$.

=====

Crash course in modular arithmetic:

If you have some integer $N$ and we have two integers $a$ and $b$ so that $a = b \pm kN$ for some integer $k$ we say $a \equiv b \mod N$. We are basically considering an arithmetic system where we consider numbers by how much more than a multiple of $N$ they are.

Ex: If $4732895738927 \equiv 8647 \mod 10$ because $4732895738927 = 8647 + 10k$. Basically if $a \equiv b \mod 10$ then $a$ and $b$ have same last digit as $a = b + 10k$ for some $k$.

Lemma: if $a \equiv b \mod N$ and $c \equiv d \mod N$ then:

i) $a + c \equiv b+d \mod N$

ii) $ac \equiv bd \mod N$

iii) $a^n \equiv b^n \mod N$.

Pf: i) $a = b + kN$, $c = d + jN$ so $a+c = b + d + (j+k)N$ so $a+c \equiv b+d \mod N$.

ii) $a = b + kN$, $c = d + jN$ so $ac = (b+kN)(d+jN) = bd + (dk + bj)N + jkN^2 = bd + (dk + bj + jkN)N$. so $ac \equiv bd \mod N$.

iii) by induction $a^1 \equiv b^1 \mod N$ and if $a^n \equiv b^n \mod N$ then $a^{n+1} = a^na \equiv b^nb \mod N \equiv b^{n+1} \mod N$.

So we can apply this to your problem: $237 \equiv 7 \mod 10$ so $237^{1002} \equiv 7^{1002}$.

Notice: If you consider $0, 1,.....,N -1, N, 1 + N, ......, 2N-1, 2N, 2N + 1....$ there are at most $0,1,.....,N-1$ distinct values that can be equivalent $\mod N$ so for all the $a^k$ there must only a finite number of distinct things for $a^k$ to be equivalent $\mod N$ so there must be some $a^k \equiv a^j \mod N$ where $k \ne j$.

And if $a^k \equiv 1 \mod N$ then $a^{nk} = (a^k)^n \equiv 1^n \mod N \equiv 1 \mod N$.

So for example $7^2 \equiv 49 \equiv 9 \mod 10$

$7^3 = 7^2*7 \equiv \mod 10 \equiv 9*7 \equiv 63 \equiv 3 \mod 10$

$7^4 = 7^3*7 \equiv 3*7 \equiv 21 \equiv 1 \mod 10$.

So $7^{1000} = (7^4)^{250} \equiv 1^250 \equiv 1 \mod 10$.

Putting this all together:

$237^{1002} \equiv 7^{1002} = 7^{1000}*7^2 \equiv (7^4)^{250}*49 \equiv 1^{250}*49 \equiv 1*49 \equiv 9 \mod 10$

So $237^{1002}$ and $9$ have the same last digit; $9$.

====

A theorem that is beyond this crash course is Euler's Thereom. If $N$ and $a$ have not common factors, and if $\phi(N) = $ the number of numbers $1,2, ....,N$ that have no common factors with $n$... then $a^{\phi(N)} \equiv 1 \mod N$.

So in your problem $\phi(10) = 4$ because $1,3,7, 9$ have no factors in common with $10$ while $2,4,5,6,8,10$ do. And $7$ and $10$ have no common factors... So $7^4 \equiv 1 \mod 10$. (And we can test that and $7^4 = 49*49 = 40^2 + 2*9*40 + 9^2 \equiv 81 \equiv 1 \mod 10$.)

So $237^{1002} \equiv 7^{1002} \equiv (7^4)^{250}7^2 \equiv 1^{250}49 \equiv 9 \mod 10$.

0
On

Simple version without the notation:

$7 \times 1 = 7$

$7 \times 7 = 49$

$7 \times 9 = 63$

$7 \times 3 = 21$

Just look at the last digit in each case.

So the last digit of $7^1$ is $7$. The last digit of $7^2$ is $9$. The last digit of $7^3$ is $3$. And, the last digit of $7^4$ is $1$.

Thus the last digit of $7^5$ is also $7$. And the last digit of $7^9$ is $7$ (because $7^4 \times 7^4 \times 7 = 7^9$, and the last digits thereof are $1 \times 1 \times 7$.)

And the last digit of $7^{51}$ is the same as the last digit of $7^{47}$, which is the same as the last digit of $7^{43}$, which is the same as the last digit of $7^{39}$ (see the pattern?)...which is the same as the last digit of $7^{7}$, which is the same as the last digit of $7^3$, which is $3$.

By the same logic, the last digit of $7^{1002}$ is the same as the last digit of $7^2$, which is $9$.

0
On

There's a quite simple way of solving these kinds of problems using Chinese remainder theorem and Fermat's little theorem.

We want to know $237^{1002}$ mod $10$. As Servaes has pointed out, $237^{1002} \equiv 7^{1002} \mod{10}$, so we can work with $7^{1002}$ which is simpler.

Using Fermat's little theorem (which tells us $7^4 \equiv 1$ (mod $5$)) we get: $7^{1002} \equiv (7^4)^{250}\cdot7^2 \equiv 1^{250}\cdot49 \equiv 49 \equiv 4\ \ (\text{mod } 5)$

Also $7^{1002} \equiv 1^{1002} \equiv 1\ \ (\text{mod } 2)$,

The chinese remainder theorem tells us that the system \begin{cases} x \equiv 4 \ \ \text{(mod } 5) \\ x \equiv 1 \ \ \text{(mod } 2) \\ \end{cases}

Has exactly one solution mod $10$. It's easy to find it by trial and error since we only have 10 options: the solution is $x \equiv 9$ (mod $10$).

Treating $7^{1002}$ as our unknown and applying that result we conclude $7^{1002} \equiv 9$ (mod $10$).

Edit: a quicker but less mechanic way to solve this particular problem is to use Euler's theorem, which is a generalized version of Fermat's little theorem. Euler's theorem tells us that if $a$ and $n$ are relatively prime then $a^{\phi(n)} \equiv 1$ (mod $n$), where $\phi(n)$ counts the positive integers up to a given integer $n$ that are relatively prime to $n$.

With $n = 10$ and $a = 7$ we have $7^4 \equiv 1$ (mod 10). (Of course we don't need the theorem to know this, given that $7^4 = 2401$, but that's where we get the idea).

So $7^{1002} \equiv (7^4)^{250} \cdot 7^2 \equiv 1^{250}\cdot49\equiv49\equiv 9 $ (mod 10).

0
On

$ {\rm mod}\ 10\!:\ \color{#c00}{7^{\large 4}\equiv\bf 1}\,\Rightarrow\, 7^{\large J+4K}\!\equiv 7^{\large J}(\color{#c00}{7^{\large 4}})^{\large K}\!\equiv 7^{\large J}\color{#c00}{\bf 1}^{\large K}\!\equiv 7^{\large J}\, $ by standard Congruence Rules.

Finally write $\ 1002 = J\!+\!4K\ $ for $\,0\le J < 4\ $ and apply the above.

0
On

You can solve this using Euler's theorem:

  • $\gcd(237,10)=1$
  • Therefore $237^{\phi(10)}\equiv1\pmod{10}$
  • Therefore $237^{\phi(2\cdot5)}\equiv1\pmod{10}$
  • Therefore $237^{(2-1)\cdot(5-1)}\equiv1\pmod{10}$
  • Therefore $237^{1\cdot4}\equiv1\pmod{10}$
  • Therefore $237^{4}\equiv1\pmod{10}$

Therefore $237^{1002}\equiv237^{4\cdot250+2}\equiv(\color\red{237^{4}})^{250}\cdot237^{2}\equiv\color\red{1}^{250}\cdot237^{2}\equiv56169\equiv9\pmod{10}$.

5
On

Short version:

Modulo $10$, the powers of $237$ up to $1002$, like those of $7$, are $1,7,9,3,1,\cdots 9$. (The period is $4$).

5
On

It will be many words to show the related theroy. So I would like the solve the problem as follow:

  1. $237 \equiv 7 \pmod{10}$
  2. $7 ^ 4 \equiv 1 \pmod{10}$
  3. $1002 \equiv 2 \pmod{4}$

Now $237^{1002} \equiv 7^{1002} \equiv 7 ^ 2 \equiv 49 \equiv 9 \pmod{10}$.

So your answer is $9$. In a similar way, you can get the last two digits is $69$ as follow.

  1. $237 \equiv 37 \pmod{100}$
  2. $37 ^ {20} \equiv 1 \pmod{100}$
  3. $1002 \equiv 2 \pmod{20}$

Now $237^{1002} \equiv 37^{1002} \equiv 37 ^ 2 \equiv 1369\equiv 69 \pmod{100}$.

0
On

$237^{1002}=237^{1000+2}$

$237^2 \times 237^{1000}$

as you know unit digit in case of powers repeat after each fourth power

so $unit digit(237^2\times 237^{1000})=unit digit(237^2)\times unit digit(237^{1000})$

$=9\times 1=9$