Counting numbers up to 100000 whose digits add to nine
Question
How many positive integers not exceeding have a digit sum of exactly ? (For instance, , and are such numbers.)
Short answer
. itself has digit sum , so pad every candidate to five digits with leading zeros. We then count solutions of in non-negative integers; no digit can exceed anyway. Stars and bars gives .
Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solutionLessons behind this question
- Counting and Combinatorics
- Sample Spaces, Events, and the Probability Axioms
- Conditional Probability, Total Probability, and Bayes' Rule
Start with a free lesson: Probability Fundamentals is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.
Read it free