prove that a number $N$ is divisible by $5^k$ if the last $k$ digits are divisible by $5^k$.
-
Hint $\ \ \large 5^K\mid 10^K, \Rightarrow,\ N\bmod 5^K =, \overbrace{(N\bmod 10^K)}^{\large {\rm last}\ K\ {\rm digits}} \bmod 5^K\ \begin{align} \ \ \end{align} $ – Bill Dubuque May 21 '19 at 13:11
-
See this answer for more examples of this method of dividing first by a simpler multiple (here $10^K$ is simpler to divide (or mod) by since we are using radix $10 =$ decimal arithmetic). – Bill Dubuque May 21 '19 at 13:11
3 Answers
Let $a$ be the number obtained by taking the last $k$ digits of $N$, and let $b = N-a$. Then $b$ has zeroes as its last $k$ digits and so is divisible by $10^k$ and therefore divisible by $5^k$. So we have $b \equiv 0 \pmod {5^k}$ which implies$N \equiv a \pmod {5^k}$, and so $N$ is divisible by $5^k$ iff the last $k$ digits are.

- 8,186
Another presentation:
By Euclidean division, we can write any number $N$ as $$N=N_1 10^k+N_2,\quad 0\le N_2<10^k.$$ Observe the remainder is just the number represented by the last $k$ digits of $N$, and it is clear from this equality that $N$ is divisible by $5^k$ if and only if $N_2$ is.

- 175,478
If the number formed by the last $ k$ digits on $N$ is denoted by $M$ then $$ N=M+(N-M)$$
Note that both $M$ and $(N-M)$ are divisible by $5^k$ because $(N-M)$ ends with $k$ zeros.

- 68,728