Find the last digit of $7^{802} -3^{683}$

255 Views Asked by At

Find the last digit of $$7^{802} -3^{683}$$

$$7^{802} -3^{683}=(50 -1)^{401} -3(10 -1)^{341}$$ $$=50k -1 -3(10m -1) \space \text{where k,m are fixed integer } $$ $$=50k -30m +2 $$ So,the last digit will be $2$

Someone just added this question, but deleted it. I solved this question and got this thing. I just want to know if my answer correct or not.

3

There are 3 best solutions below

7
On

Yes, your proof using the Binomial Theorem is correct. It is simpler using congruences

$$\begin{align} {\rm mod}\ 10\!:\,\ \color{#0a0}{7^{\large 2}}\equiv \color{#c00}{-1}\equiv \color{#0a0}{3^{\large 2}}\ \Rightarrow\, &\ \ (\color{#0a0}{7^{\large 2}})^{\large 401}\!-3(\color{#0a0}{3^{\large 2}})^{\large 341}\\ \equiv\ &(\color{#c00}{-1})^{\large 401}-3(\color{#c00}{-1})^{\large 341}\\ \equiv\ &\ \, {-}1\ \ \ + \ \ \ 3\\ \equiv\ &\ \ \ \ 2\end{align}\qquad\qquad $$

This is precisely the same as your proof, except we eliminated the Binomial Theorem in favor of congruences. Notice how the BT calculation becomes obvious in congruence language, reducing to the trivial result that $\,{\rm mod}\ 10\!:\ (10j\!-\!1)^{2n+1}\equiv (-1)^{2n+1}\equiv {-}1.\ $ Similarly congruence arithmetic serves to trivialize many other arithmetical computations.

0
On

Okay, after reading the comments I realize my answer is completely out of the experience level of the OP. But read ahead for a taste of exciting things to come.

=====

Very nice!

I want to introduce you to the idea of Fermat's Little Thereom however.

If $\gcd(a, m) = 1$. And $\phi(m) = $ the number of natural numbers less than $m$ that are relatively prime to $m$ then:

$a^{\phi (m)} \equiv 1 \mod m$

(or in other words $a^{\phi(m)} = km + 1$ for some $k$.)

So... as $1,3,7$ and $9$ are relatively prime to $10$ so $\phi(10) = 4$. And $\gcd(7,10) = \gcd(3,10) = 1$.

So $7^4 = 1 \mod 10$ ($7^4 = 2401$) and $3^4 \equiv 1 \mod 10$ ($3^4 = 81$).

So $7^{802} - 3^{683} = 7^{2 + 4k} - 3^{3 + 4j}$

$= 7^2*(7^4)^k - 3^3*(3^4)^j \equiv 7^2*1^k - 3^3*1^j \mod 10$

$\equiv 49 - 27 \mod 10 \equiv 9 -7 \mod 10 = 2 \mod 10$

So $2$ is the last digit.

.........

Okay, I admit, now that I've typed the whole thing out that seems a LOT more complicated than your elegant fast solution.

But it's useful to know.

If I asked "what is the remainder when $8^{386} - 6^{216}$ is divided by $13$" it might be easier to use Fermat's Little Theorem, rather than "$8^2 = 64 = 5*13 - 1$ and $6^6 = 46656 = 3589*13 - 1$ so $(-1)^{193} - (-1)^36 = -1 -1 =-2$ so $11$ is the remainder"

[$13$ is prime so all numbers less than $13$ are relatively prime so $\phi(13) = 2$. So $8^{386} \equiv 1 \mod 13$ and $6^216 \equiv 1 \mod 13$.

[So $8^{386=2 + 12k} - 6^{216=12j} \equiv 8^2 - 1 \mod 13$

[$\equiv 63 \mod 13 \equiv 11 \mod 13$]

0
On

The last digit of 7^802 is the same as 7^2, which is 9. The last digit of 3^683 is the same as 3^3, which is 7. Then 9-7 = 2.