9
$\begingroup$

What is the smallest positive integer N, such that the digit sum of N and N+1 are both divisible by 19?

$\endgroup$
4
  • 1
    $\begingroup$ Are you asking about 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$ Jan 13 at 21:10
  • $\begingroup$ @Punintended The wording is ambiguous. It should be "the digit sums of N and N+1 are both divisible by 19" else it's too simple. $\endgroup$
    – xhienne
    Jan 13 at 21:18
  • $\begingroup$ @xhienne I figured that was the case, but Glorfindel beat me to the answer so I was hoping it was the latter ;P $\endgroup$ Jan 13 at 21:25
  • $\begingroup$ Thanks for the hint of the wording, I corrected it! $\endgroup$
    – ThomasL
    Jan 13 at 22:23
14
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.