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

$$\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.

• Numbers divisible by the sum of their digits are known as harshad numbers. Commented Jul 4, 2020 at 17:51
• @GeoffreyTrang But Harshad numbers need not have exactly $n$ digits. Commented Jul 4, 2020 at 18:00
• I saw this problem in "The IMO Compendium" page 293 (Shortlisted Problems). Link: books.google.co.uz/… Commented Jul 4, 2020 at 18:35
• And of course, Kalva has solutions to several shortlist problems Commented Jul 4, 2020 at 19:11

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$$.