# How to factor 3 out of $10^n-1$

There is a statement $$3|10^n-1 \quad \quad \textrm{for} \quad n \in \mathbb{N}:n \geq 0$$ that can be easily proven with mathematical induction.

However, if that number is divisible by $3$, we should be able to write $10^n-1$ as $3\cdot x$. And the question is how to do that. I have been toiling over that since weeks and I haven't found any solution. Even WolframAlpha doesn't show any other form of that equation, but I believe we must be able to factor $3$ out of that.

• Are you familiar with identities involving the polynomial $x^n-1$ ?
– user228113
Nov 4, 2016 at 14:50
• What do you mean with "how to do that"? Nov 4, 2016 at 14:52
• Hint Apply the Factor Theorem $\,x-a\,$ divides $\,f(x)-f(a)\,$ for polynomial $\,f(x).\,$ So for $\,f(x) = x^n,\ a = 1\,$ we get $\ x^n-1 = (x-1) g(x).\,$ Now let $\,x = 10.\ \$ Nov 4, 2016 at 14:54
• Thank you guys for hints. I expected either hints or step-by-step solution, and now it's all clear. Nov 4, 2016 at 15:02

$$(x^n-1)=(x-1)(x^{n-1}+x^{n-2}+\cdots +x+1)$$ so $$(10^n-1)=3 \times 3 \times (10^{n-1}+10^{n-2}+\cdots +10+1)$$ This is really saying for example $$10000000000 - 1 = 9999999999 = 3\times 3333333333 = 3\times 3 \times 1111111111$$ and it does not matter how many repeated digits are involved
$$10^n-1 = \sum_{k=0}^{n-1} 9\cdot 10^k$$ so $$\frac{1}{3}(10^n-1) = \sum_{k=0}^{n-1} 3\cdot 10^k.$$
What about $\sum_{i=0}^{n-1} 3 \cdot 10^i$?