0

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.

J. W. Tanner
  • 60,406
  • See this answer in the linked dupe for a more general result. – Bill Dubuque May 04 '21 at 08:36
  • 1
    Fermat's Theorem is a special case of Euler's Theorem. Fermat says that if $p$ is prime (but not $2$ or $5$) then $10^{p-1}\equiv 1 \pmod p$ if $p$ is prime. Euler's function allows for $n$ to only be relatively prime to $10$ and states $10^{\phi(n)}\equiv 1 \pmod n$. That is EXACTLY what you need for EXACTLY the reason you expressed. (So google Euler's Theorem, and $\phi(n)$; Euler's totient function. It is exactly what you need. – fleablood May 04 '21 at 15:14
  • 1
    By the way.... remember grade school when we learned how to convert fractions to decimals? $\frac 1n = 0.\overline{abcdabcdabcd}$ and we learned to converte repeating decimals back?: $0.\overline{abcdabcdabcd}=K$ so $10000K=abcd.\overline{abcdabcd}$ so $9999K = abcd$. Bearing in mind that $K = \frac 1n$, doesn't this imply $n|9999$? – fleablood May 04 '21 at 15:21
  • Thanks BTW I'm still in grade school lol, and indeed Euler's theorem works awesome:-) –  May 05 '21 at 09:14

0 Answers0