Show that for all $n$ there exist some $n$-digit number with no $0$ in it whose digit sum divides it.

128 Views Asked by At

$\textbf{Question:}$Prove that for each positive integer $n$, there exists a positive integer with the following properties:

• it has exactly $n$ digits,

• none of the digits is $0$,

• it is divisible by the sum of its digits.

I tried for small values of $n$.For example, for $n=1,2,3$ I found $1,12,132$ works.I tried few other ones.Tried to spot any pattern but failed.After that I tried few more things but in vain.

Here digits are in decimal representation of $n$.Any kind of hint or full solution is appreciated.

1

There are 1 best solutions below

0
On

It's a classical induction problem to show that

Lemma. Given $m\ge 1$, there is an $m-$digit multiple of $2^m$ whose digits are all $1$ or $2$.

Let $2^{m-1}\le n<2^m$ and $x$ be the $(m+1)-$digit multiple of $2^{m+1}$ given by the lemma. Notice the sum of digits of $x$ lies between $m+1$ and $2(m+1)$, therefore, we can choose the $n-(m+1)$ first digits of an $n-$digit number ending in $a$ so that its sum of digits equals any value from $\underline{n-(m+1)}+\underline{2(m+1)} = n+m+1$ to $\underline{9(n-(m+1))}+\underline{m+1} = 9n-8(m+1)$.

Now its easy to see that, for big enough $n$ ($n\ge 6$ should work), we have $$\underbrace{n+m+1}_{\approx n}\le \underbrace{2^{m+1}}_{\approx 4n}\le \underbrace{9n-8(m+1)}_{\approx 9n}$$ and, of course, $2^{m+1}$ divides any number ending in $x$, so the problem is solved!

For small values of $n$, just take any number whose sum of digits is $9$.