How to show that $10^n - 1$ is divisible by $9$

How can I show that $10^n-1, 10^{n-1}-1,...., 10-1$ are all divisible by 9? I was considering using Euclid's algorithm, but I can't find a way to get that to work.


Solution 1:

$$ a^n-b^n = (a-b)(a^{n-1} + a^{n-2}b + \ldots + b^{n-1}) $$

Proof of the identity by expansion:

$$\begin{align} &(a-b)(a^{n-1} + a^{n-2}b + \ldots + b^{n-1}) \\\\ &=a^{n} + a^{n-1}b + a^{n-2}b^2 + \ldots + ab^{n-1}\\\\ &\;\;\;\;\;\;\;\;- ba^{n-1} - b^2a^{n-2}-\ldots -b^{n-1}a - b^n\\\\ &=a^n-b^n \end{align}$$

Solution 2:

we can start by 10 ≡ 1 (mod 9)

and $10^n$ ≡ 1 (mod 9) for all {n≥1}

follows from the property of congruence

If a≡ b(mod n)then $a^r≡ b^r$ (mod n), for any integer r≥ 1

$10^n-1$ ≡ 0 (mod 9)

implying that $10^n-1$ is divisible by 9 for all {n ≥ 1}

so you proved it

Solution 3:

$10^n - 1$ is the number consisting of $n$ nines. Just do long division.