Let s be the smallest positive integer with the property that its digit
sum and the digit sum of s + 1 are both divisible by 19. How many
digits does s have?
I've tried to find the smallest number, and I got 14 digits(the number 18999999999999), but I was wrong. How come there is a smaller number?
Best Answer
The digit sum of $s + 1$ for your number $18999999999999$ is $10$, not divisible by $19$.
If there are $k$ $9$'s at the end of $s$, then the digit sum of $s$ and $s + 1$ differ by $9k - 1$.
Therefore there should be at least $17$ $9$'s at the end of $s$ (as $17$ is the inverse of $9$ modulo $19$). In order for the sum to be divisible by $19$, we should add another $18$. But it is not possible to do that in two digits, as that would require another two $9$'s.
So we must have at least $20$ digits, and the smallest such $s$ is $19899999999999999999$.