5
$\begingroup$

A positive integer $n$ is multiplied by $7$. The resulting product contains just one digit repeated several times, and that digit is not $7$. What is the least number of digits in $n$?

I can only think of solving this question by brute force. Is there a better way?

$\endgroup$
0
1
$\begingroup$

You can assume by minimality of $n$ that the digit in $7n$ is 1. And 111111 is divisible by 7, so $n=15873$ and the number of digits is 5.

$\endgroup$
5
  • $\begingroup$ Why couldn't it be some other number besides $111111$? $\endgroup$ – Puzzled417 Dec 14 '15 at 4:59
  • $\begingroup$ @Puzzled417 If $222222$ were a multiple of seven, so would $111111$. It's a theorem that if a prime number $p$ is a factor of $ab$, it's either a factor of $a$ or of $b$ (or both). Here, $p$ is $7$, $a$ is $2$, and $b$ is $111111$. $7$ isn't a factor of $2$, so… (Similarly for the other digits.) $\endgroup$ – Akiva Weinberger Dec 14 '15 at 5:09
  • $\begingroup$ Well the other answers tell why but.. 1001 is 143*7. So if 1111 is divisible by 7 iff 7|110 iff 7|11 which it doesn't. 7|111 iff 7|111-21=90 iff 7|9. and 7 doesn't divide 11. $\endgroup$ – fleablood Dec 14 '15 at 5:13
  • $\begingroup$ @Avarind Other than brute force how did you know 7|11111? $\endgroup$ – fleablood Dec 14 '15 at 5:17
  • $\begingroup$ @fleabood, the simplest way is to keep adding ones till the remainder is zero; using Fermat's little theorem in this case doesn't make the calculation -six divisions - any shorter. $\endgroup$ – Aravind Dec 14 '15 at 8:29
1
$\begingroup$

We know that $7n = \underbrace{dd\ldots dd}_{k \ \text{digits}}$. Hence, $7n \cdot \dfrac{9}{d} = \underbrace{99\ldots 99}_{k \ \text{digits}} = 10^k-1$.

Since $d$ is not $7$, you know that $7n \cdot \dfrac{9}{d} = 10^k-1$ must be divisible by $7$.

Can you determine the smallest positive integer $k$ such that $10^k-1$ is divisible by $7$? Once you do this, coming up with a value for $d$ and $n$ will be easy.

Once you check that the smallest such $k$ is $6$, then you have $7n = dddddd = d \cdot 111111$. To minimize $n$, pick $d = 1$, which gives $n = 15873$.

$\endgroup$
1
$\begingroup$

Let assume that $7\times n = aa\dots a = a\times \underbrace{11\dots 1}_{k \mbox{ times}} = a \times \frac{10^k-1}{9}$.

Because $a \neq 7$, so we must find $k$ such that $10^k-1$ is divided by 7. By Fermat's little theorem, we have $10^6-1$ is divided by 7. Som the minimum of k is less than 6. So, we have the least number of $n$ is 5 (111111/7=15873).

$\endgroup$

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.