Question
How do I show that $$\underbrace{1\ldots1}_{81\text{ times}}$$ is divisible by $81$ but not by $243$?
My Attempt
Write $$\underbrace{1\ldots1}_{81\text{ times}}=\underbrace{111,111,111}_{9\text{ times}}$$ and note that $111,111,111=9 \times 12,345,679$. This also shows that $9 \mid 111,111,111$.
Now, the sum of digits of $$\underbrace{12,345,679}_{9\text{ times}}$$ is $37 \times 9$ which is clearly divisible by $9$, thereby showing that $9 \mid 12,345,679$.
This in turn shows that $$81 \mid \underbrace{111,111,111}_{9\text{ times}}$$
Next, note that $$111,111,111=243 \times 457247.37\overline{037}=243 \times \left(457247+\frac{370}{999}\right)$$
As a result, we have $$\underbrace{111,111,111}_{9\text{ times}}=243 \times \left(457247+\frac{370}{999}\right) \times \left(1+10^{9}+\cdots+10^{72}\right)$$
To show that $$243 \nmid \underbrace{111,111,111}_{9\text{ times}}$$ we need only show that $999 \nmid (1+10^9+\cdots+10^{72})$.
Indeed, as $10^3 \equiv 1 \pmod {999}$, so $10^9=(10^3)^3 \equiv 1^3 \equiv 1 \pmod {999}$ and in general $10^{9a} \equiv 1 \pmod {999}$ for $a \in \mathbb{N}$. Since $$(1+10^9+\cdots+10^{72}) \equiv \underbrace{1+\cdots+1}_{9\text{ times}} =9 \pmod {999}$$ so $999 \nmid (1+10^9+\cdots+10^{72})$ and we get the desired result.
Doubt
Is the above solution correct? If it is correct, is there a shorter and more elegant solution?