Divisibility rules/Rule for 5 and powers of 5 proof

Revision as of 22:45, 16 August 2006 by Joml88 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A number $N$ is divisible by $5^n$ if the last $n$ digits are divisible by that power of 5.

Proof

An understanding of basic modular arithmetic is necessary for this proof.

Let the base-ten representation of $N$ be $a_ka_{k-1}\cdots a_1a_0$ where the $a_i$ are digits for each $i$. Thus

$N = 10^k a_k + 10^{k-1} a_{k-1} + \cdots + 10 a_1 + a_0.$

Taking this $\mod 5^n$ we have

$N$ $= 10^k a_k + 10^{k-1} a_{k-1} + \cdots + 10 a_1 + a_0$
$\equiv 10^{n-1} a_{n-1} + 10^{n-2} a_{n-2} + \cdots + 10 a_1 + a_0$
$\equiv a_{n-1}a_{n-2}\cdots a_1a_0 \pmod{5^n}$

Thus if the last $n$ digits of $N$ are divisible by $5^n$ then $N$ is divisible by $5^n$.

See also