Is there any simple way to find the smallest n digit number that can divide n digit number.

For Example: Lets take a two digit number xx. I want to find the smallest two digit(yy) number that can divide the number xx.

And if its three digit xxx then i need to find smallest three digit yyy.

  • $\begingroup$ I guess the question is: Is $\overbrace{11\cdots 1}^\text { n digits}$ the smallest $n$-digit divisor of $\overbrace{99\cdots 9}^\text { n digits}$? $\endgroup$ – Maesumi Jul 11 '13 at 10:03
  • $\begingroup$ On second thought the problem is asking given $n$ and $m$, how to find the smallest divisor of $n$ larger than $m$. $\endgroup$ – Maesumi Jul 11 '13 at 10:09
  • $\begingroup$ @Maesumi This is clear, because any smaller divisor would have to be smaller than $99...9/10$ and would have at most $n-1$ digits $\endgroup$ – Cocopuffs Jul 11 '13 at 10:09
  • $\begingroup$ @Maesumi: Sorry I haven't written the question properly. I have made an edit. Hope it helps $\endgroup$ – karthick Jul 11 '13 at 10:21

If $N$ is an $n$ digit number and $d$ is another $n$ digit number dividing $N$, then $1\le N/d\le 9$. So you divide succesively by $9$, $8$, ..., $1$ until an exact division occurs. In your example $99/9=11$, so $11$ is the solution. If $N$ is prime (and $n\ge2$), then it is not divisible by $2,3,\dots,9$, so that the smallest $n$ digit number dividing $N$ is $N$ itself.

  • $\begingroup$ Even if $N$ is not prime, the answer may be $N$ itself, e.g., $N=12$, or $N=49$. $\endgroup$ – Gerry Myerson Jul 11 '13 at 10:13
  • $\begingroup$ @Julian Aguirre: Thank you. $\endgroup$ – karthick Jul 11 '13 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.