The sum of the digits in 2017 is 10. How many numbers from 2000 to 3000 also have this property, including 2017?
I used the stars and bars. The first digit (thousands digit) must be 2 (it's between 2000 and 3000), and so the rest of the 3 digits can sum up to 8. So there are 8 stars and 2 bars (you're dividing 8 among 3 groups), which gives me $\binom{10}{2} = 45$ - so there'd be 45 numbers, right? There wasn't an answer, so I wanted to check this.