parmenides51 wrote:
Let $A$ be the subset of the natural numbers such that the sum of Its digits are multiples of$ 2009$. Find $x, y \in A$ such that $y - x > 0$ is minimum and $x$ is also minimum.
Since $x\equiv y(\equiv 2)\pmod 3$, $y-x\equiv 0\pmod 3$
Let us look at $y-x=t\in\{3,6,9\}$.
If adding $t$ to $x$ implies no carries, their sum of digits differ of $t$, and so can not be both equal to $2009$
If adding $t$ to $x$ produces $n\ge 1$ successive carries, it means :
$x=\overline{abcd.....v}\overbrace{99..99}^{(n-1)\times}\overline u$
$y=\overline{abcd.....(v+1)}\overbrace{00..00}^{(n-1)\times}\overline{(u+t-10)}$
And the difference of sum of digits of $x,y$ is $9n-t$ which can only be zero if $n=1$ and $t=9$
So $y-x\ge 9$ and :
$x=\overline{abcd.....vu}$
$y=\overline{abcd.....(v+1)(u-1)}$
And smallest $x$ implies smallest $a+b+c+d+....$ and so greatest $u+v$ and so $\overline {vu}=89$
And $a+b+c+d+....=2009-8-9=1992=3+9\times 221$
and so :
$\boxed{x=3\overbrace{99...999}^{221\times}89}$
$\boxed{y=3\overbrace{99...999}^{221\times}98}$
with $\boxed{\min(y-x)=9}$