Puzzling Stack Exchange is a question and answer site for those who create, solve, and study puzzles. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Determine the smallest integer $n > 0$ for which

  • the sum of the decimal digits of $n$ is divisible by $20$,
  • $n$ is divisible by $20$.

Question inspired by Divisible by seventeen.

share|improve this question
up vote 6 down vote accepted

The answer is



The number must end in 0 and the other digits must add up to 20 (at least). Since $9+9<20$, the number must have at least four digits. It cannot begin with 1 since the maximum sum of the digits is $1+9+9 < 20$ and it cannot begin with 2 since $2+9+9=20$ but 2990 is not divisible by 20. Therefore $n > 3000$. Since $3+8+9=20$ is the only possible sum under these constraints (i.e, $n$ begins with 3 ends in 0 and the digit sum is 20), the first number that works is 3980.

share|improve this answer




We must have 00, 20, 40, 60 or 80 as its last two digits to be divisible by 20.
For the smallest number we'll want 80 to kick off the digit sum as large as possible.
We now need smallest number of digits that sum with 8 to to give 20.
That's 2 digits: 6, 6 or 7, 5 or 8, 4 or 9, 3.
Of those pairs want the one with the lowest integer to take the thousand's place.
That's 9 and 3 so we have 3980.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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