0

Given an integer n, show that an integer can always be found which contains only the digits 0 and 1 (in the base 10 notation) and which is divisible by n. How to solving this problem?

K.C.S.
  • 193

1 Answers1

1

Let be $n=2^r\cdot3^s\cdot5^tm$. Let be $u=\max(r,t)$. Let be $k=3^{s+2}m$.

Consider the number $$N=\frac{10^{\phi(k)}-1}9\cdot10^u$$were $\phi$ is the totient function. We'll show that $N$ is multiple of $n$ and that its digits are $0$ and $1$.

Euler's theorem tells us that $10^{\phi(k)}-1$ is multiple of $k=3^{s+2}m$. Hence, $(10^{\phi(k)}-1)/9$ is multiple of $3^sm$ and $N$ is clearly multiple of $n$.

The decimal representation of $N$ has $\phi(k)$ $1$'s and $u$ $0$'s, which completes the proof.

ajotatxe
  • 66,849