$n$- relatively prime with $10$, then show that there exists another natural number $m$ such that all its digits are $1'$s and $m$ is divisible by $n$

45 Views Asked by At

If there is a natural number $n$ relatively prime with $10$, then show that there exists another natural number $m$ such that all its digits are $1'$s and $m$ is divisible by $n$.

Approach:

Let the number of $1$'s in $m$ be $x$.

So $m=111111.....(x$ times$)$

[$x$ can vary depending upon the $n$ we choose.]

By GP sum:

$$m = \cfrac{10^x-1}{10-1}$$


Why I did GP sum:

This is actually motivated from a different question, which goes like this:

If $c=111...(91$ times$)$, state whether $x$ is composite or prime.

For solving this, we take $$c = \cfrac{10^91-1}{10-1}$$ $$c= \cfrac{(10^{13})^7-1}{10-1}$$ $$c= \cfrac{(10^{13})^7-1}{10^7-1} \times \cfrac{10^7-1}{10-1}$$

So $c$ can be expressed as a product of these two numbers out of which neither is $1$, so it is composite.

I thought that if we consider a number $n$ such that GCD$(n,10)=1$, then we can always break $m$ in such a way that it becomes a factor of $n$, but it isn't working.


Someone suggested me to use Fermat's theorem:

I did so, but it isn't full proof, I think.

I did it as follows:

$10^{n}-1$ is divisible by $n$ if $10,n$ where $n$ is prime, so obviously $10,n$ are co-prime.

$n=3,7,11,13,17....$

So, $10^{2}-1$ is divisible by $3$, $10^{6}-1$ is divisible by $7$ and so on.

So for example we get $99999$ divisible by $7$ so, obviously $11111$ is divisible by $7$.

Problem: This would work only for prime numbers, but it has said "relatively prime" in the question, so we need to find a different criteria for the other numbers (Example: $9,51$, etc).


Any hints or help would be appreciated! Thanks.