How many positive integers smaller than have the sum of the digits divisible by and are multiples of ?
Slovenia — National Math Olympiad
Pick one
Solution
The sum of the digits of a multiple of is divisible by . So, we are looking for numbers with the sum of the digits divisible by . The sum of the digits of any number smaller than is less than or equal to . So, in our case the sum of the digits is equal to .
The smallest possible digit is at least and at most . The only possible triples of digits are , , , , , and . Each triple with three different digits corresponds to six different numbers. Each triple with two equal digits corresponds to three different numbers and the triple corresponds to one number. Hence, there are numbers with the required properties.
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.