I said to myself that it would be funny to find a natural number whose digits add to $69$ divisible by $420$. At first it might sound really silly but when I tried to find such a number it turned out to be way more difficult that I thought.
At first I tried the following, let $n$ be any number such that $420 \mid n$ and $s(n) = 420$, being $s(n)$ the sum of its digits. So for some $k \in \mathbb{N}$, $s(n) = s(420k) = s(2^2 \cdot 3 \cdot 5 \cdot 7\cdot k) = 69$, but I noticed that this wouldn't take me anywhere since I don't know any way of solving for all possible $k$.
The next thing that I tried was finding a number using the divisibility criteria, so I found the number $777.777.777.420$ since it is clearly divisible by $7$, its digits add to a multiple of $3$, more specifically $69$, and its last two digits are a multiple of $4$ and $5$. So this method proved to be useful but not quite efficient.
My question is:
Given any numbers $a$ and $b$, what is the easiest way to find natural numbers $n$ such that $a \mid n$ and $s(n) = b$?