What is the smallest positive integer N, such that the digit sum of N and N+1 are both divisible by 19?
1 Answer
I think it is
$N = 199 \cdot 10^{17} - 1 = 1989999999999999999999$ (digit sum 171 = 9 * 19)
$N + 1 = 199 \cdot 10^{17} = 1990000000000000000000$ (digit sum 19)
Reasoning:
The number $N$ ends in $n$ nines, where $n \ge 0$. The difference between the digit sum of $N + 1$ and $N$ is $1 - 9n$. Both digit sums are divisible by $19$, so their difference must be as well. The smallest $n$ for which $1 - 9n$ is divisible by $19$ is $n = 17$, so $N$ must end in $17$ nines, for a digit sum of $153$. The next multiple of $19$ is $171$, so the remaining digits of $N$ must add up to $171 - 153 = 18$. Two nines is not possible, since the number must end in $17$ nines, not $19$. The next number that qualifies is $198$.
digit sum (N) + digit sum (N+1)
being divisible by 19, or the digit sums of N and N+1 each being divisible by 19? $\endgroup$