1
$\begingroup$

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?

$\endgroup$
1
  • 3
    $\begingroup$ In your case the digit sum of $s+1$ is 10. $\endgroup$
    – markvs
    Aug 23, 2020 at 1:46

1 Answer 1

1
$\begingroup$

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

$\endgroup$
2
  • 1
    $\begingroup$ It’s better to emphasize that $s$ must have $9$(s) at its end. Otherwise, the digital sum of $s$ and $s+1$ differ by $1$ and are co - prime $\endgroup$ Aug 23, 2020 at 1:58
  • 1
    $\begingroup$ @RezhaAdrianTanuharja It is in fact implied by the requirement that $9k - 1$ is divisible by $19$. This excludes $k = 0$. $\endgroup$
    – WhatsUp
    Aug 23, 2020 at 1:59

Your Answer

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