Problem:
ANY single digit written $(p-1)$ times is divisible by $p$, with $p$ a prime $>5$.
For exemple: $222222$ is divisible by $7$.
How prove it? (if is really true)
Problem:
ANY single digit written $(p-1)$ times is divisible by $p$, with $p$ a prime $>5$.
For exemple: $222222$ is divisible by $7$.
How prove it? (if is really true)
On
Let $xxx..$ be the number, $x$ written $p-1$ times. This number can be written as $x+10x+10^{2}x+...10^{p-2}x=x(1+10+10^{2}+...10^{p-2})=$$x(10^{p-1}-1)/9. $
Now by Fermat's Little Theorem, $(10^{p-1}-1)$ is divisible by $p$ (since $p>5$). $(10^{p-1}-1)$ is also divisible by $9$ and since $9$ and $p$ are coprime, it's also divisible by $9p$. Therefore,$(10^{p-1}-1)/9p$ is an integer $(=k)$. Therefore, $x(10^{p-1}-1)/9=p(xk) $.
This is equivalent to showing that the number consisting of $(p - 1)$ one's written in a row is divisible by $p$. That is, we want to show that
$$p \mid \sum_{k = 0}^{p - 2} 10^k.$$
Now this number is just
$$\sum_{k = 0}^{p - 2} 10^k = \frac{10^{p - 1} - 1}{10 - 1} = \frac{10^{p - 1} - 1}{9}.$$
Now if $p$ is prime, Fermat's little theorem implies that $10^{p - 1} - 1$ is divisible by $p$ (note that we use $p > 5$ here to rule out the case that $10$ and $p$ have common divisors!). Furthermore, $p$ and $9$ are relatively prime, and the result follows.