Can we prove that there exists a number having only digits $0$ and $1$ with $k$ $1$’s that is divisible by $k$

91 Views Asked by At

I was trying to proof the following theorem:

For all $k$ element of the set of natural numbers, there exists a zero one number that has exactly $k$ $1$’s that is divisible by $k$.

For example, if $k=3$, then the number can be $1011$, which is divisible by $k$.

It is easy to construct such a number for a given integer, but how do we prove the existence of such a number for any integer?

1

There are 1 best solutions below

0
On

Let $k'$ be the largest natural number satisfying $k' \ | \ k$ and $\gcd(k', 10) = 1$. Let me tell you how to deal with $k' = k$, and it should not be too hard to get to the general case.

By Euler's theorem, $10^{\phi(k)} \equiv 1 \pmod k$. So $1 + 10^{\phi(k)} + 10^{2\phi(k)} + \cdots + 10^{(k-1)\phi(k)}$ is divisible by $k$, and is what you need.