2
$\begingroup$

Let's say a number $n$ is insertable if for every digit $d$, if we insert $d$ between any two digits of $n$, then the obtained number is a multiple of $d$. For example, $144$ is not insertable because $1474$ is not divisible by $7$.

The question is the find the smallest insertable positive integer with at least two digits.

It is relatively easy to see that such a number have to be divisible by $2520$ (assuming it is at least $4$-digits long). I also ran a script to check all integers below 75,000,000,000 with no success (the issue might be my code).

Disclaimer. I do not know if such a number do exist.

$\endgroup$
14
  • $\begingroup$ if the number ends with 000 then we have $2,4,5,8,10$ covered $\endgroup$
    – Asinomás
    Sep 29, 2020 at 16:56
  • $\begingroup$ if the number is a multiple of $9$ we also have $3,6$ and $9$ covered. $\endgroup$
    – Asinomás
    Sep 29, 2020 at 16:57
  • $\begingroup$ With this type of reasoning we may be able to find a satisfactory number, but not necessarily the smallest one. $\endgroup$
    – user601568
    Sep 29, 2020 at 16:58
  • $\begingroup$ I think this one works: $77777777000$ $\endgroup$
    – Asinomás
    Sep 29, 2020 at 16:59
  • $\begingroup$ Yes the big problem is $7$ $\endgroup$
    – user601568
    Sep 29, 2020 at 16:59

2 Answers 2

1
$\begingroup$

Let $a_m....a_1a_0$ be any insertable number. Then, for each digit $d$ we must have $$a_m..a_kda_{k-1}..a_0$$ is a multiple of $d$.

In particular, $$d| a_m..a_kda_{k-1}..a_0-a_m..a_ka_{k-1}d..a_0=10^{k-1}9(d-a_k)$$

Since $7$ is the only digit relatively prime with $10$ and $9$, we should concentrate on $d=7$.

$d=7$ implies that $a_k=0,7$ for all $k$.

Next, $d=9$ implies that the number must contain at least 9 sevens. Since it must end in $000$ the smallest possible example is indeed $777777777000$.

P.S. The above shows that any insertable number must have all digits $0$ and $7$, contain a multiple of $9$ number of $7$'s and end in three 0's. It is easy to check if the converse is also true, I think it is but I am too lazy :D

$\endgroup$
3
  • $\begingroup$ I think only $2$ zeros suffice in retrospect $\endgroup$
    – Asinomás
    Sep 29, 2020 at 17:29
  • $\begingroup$ @JorgeFernández-Hidalgo $787777777700$ is not divisible by $8$. $\endgroup$
    – N. S.
    Sep 29, 2020 at 17:30
  • $\begingroup$ oh yeah ${}{}$. $\endgroup$
    – Asinomás
    Sep 29, 2020 at 17:30
1
$\begingroup$

We are going to characterize the numbers such that when you insert a $7$ in between the number is still a multiple of $7$.

Suppose the number has consecutive digits $a$ and $b$ such that $a$ is not the leftmost digit.

We can consider the number that is formed when you put the $7$ to the left of the $a$ and also the number that is formed when you put the $7$ between the $a$ and $b$. Notice the difference of these numbers is a multiple of $7$, the difference between these two numbers is $9(7-a)$ multiplied by a power of $10$. We conclude every digit must be a $7$ or a $0$ except for possibly the first and last ones. In our case we know that the final digit is a $0$. But if this happens then the first one must also be $7$ because otherwise the number won't work.

Therefore the number must only have zeros or sevens.

If the number ends in $70$ it wont work because $780$ is not a multiple of $8$. If it ends in $700$ it wont work because $700$ is not a multiple of $8$ (notice that there are at least $9$ digits so we can put the $8$ to the left).

With the condition that the number must be a multiple of $9$ we need at least $7$ zeros and the number must end in $00$. The smallest number is $777777777000$

$\endgroup$
0

Your Answer

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