Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

The number of integers between 1 and 1000000 having the sum of the digits equals to 18 is
(a) 33649
(b) 25927
(c) 41371
(d) None of these

Answer
VerifiedVerified
529.5k+ views
1 likes
like imagedislike image
Hint:Assume that the numbers are of the form abcdef. Calculate all the possible numbers abcdef such that a+b+c+d+e+f=18 , where anyone of the digits is greater than or equal to 10. Subtract this set of numbers from the number of the form abcdef to get the required answer.

Complete step-by-step answer:
We have to calculate the number of possible integers between 1 and 1000000 such that the sum of digits is equal to 18.
We will assume that the numbers are of the form abcdef such that a+b+c+d+e+f=18 and a,b,c,d,e,f0.
We know that the number of possible non-negative solutions of a1+a2+...ar=n is n+r1Cr1.
Substituting r=6,n=18 in the above expression, the number of possible numbers of the form abcdef such that a+b+c+d+e+f=18 and a,b,c,d,e,f0 is 18+61C61=23C5.
However, we observe that some of these numbers have digits greater than or equal to 10. So, we have to remove those numbers. We will count all such possible numbers.
Let’s assume one digit, say ‘a’ is greater than or equal to 10.
So, the sum of the other five digits is 18a. Thus, we have b+c+d+e+f=18a. We have to count all possible combinations of b, c, d, e, and f.
So, the possible number of ways to choose b, c, d, e, and f such that b+c+d+e+f=18a is 18a+51C51=22aC4. This value should be multiplied by 6 as anyone of numbers among a, b, c, d, e, and f can have a digit greater than or equal to 10. We observe that the possible values of a are [10,18].
Thus, the possible numbers whose any one digit is greater than or equal to 10 is =6(2210C4+2211C4+2212C4+2213C4+2214C4+2215C4+2216C4+2217C4+2218C4)
Simplifying the above expression, the possible numbers whose any one digit is greater than or equal to 10 is =6(12C4+11C4+10C4+9C4+8C4+7C4+6C4+5C4+4C4).
We can rewrite 4C4 as 5C5 as both of them are equal to 1.
Thus, the possible numbers whose any one digit is greater than or equal to 10 is =6(12C4+11C4+10C4+9C4+8C4+7C4+6C4+5C4+5C5).
We know the formula nCr+nCr+1=n+1Cr+1.
By applying formula the last two terms of expression i.e 5C4+5C5 can be written as 6C5.Similarly apply the formula for the last two terms and simplify it ,we get
The possible numbers whose any one digit is greater than or equal to 10 is =6(12C4+11C4+10C4+9C4+8C4+7C4+6C4+6C5).
6(12C4+11C4+10C4+9C4+8C4+7C4+7C5)6(12C4+11C4+10C4+9C4+8C4+8C5)6(12C4+11C4+10C4+9C4+9C5)6(12C4+11C4+10C4+10C5)6(12C4+11C4+11C5)6(12C4+12C5)6(13C5)
Thus, the possible numbers whose any one digit is greater than or equal to 10 is 6(13C5). We will now subtract this value from all the possible six-digit integers whose sum is 18.
So, the number of six-digit integers whose sum is 18 is =23C56(13C5)=23!18!5!6(13!5!8!)=25927.
Hence, the number of integers between 1 and 1000000 having the sum of the digits equals to 18 is 25927 which is option (b).

Note: One must subtract the numbers whose digit is greater than or equal to 10 as such numbers don’t exist. Students should know the formulas nCr=n!r!(nr)! , the number of possible non-negative solutions of a1+a2+...ar=n is n+r1Cr1 and nCr+nCr+1=n+1Cr+1 for solving these types of questions.
.
Latest Vedantu courses for you
Grade 10 | CBSE | SCHOOL | English
Vedantu 10 CBSE Pro Course - (2025-26)
calendar iconAcademic year 2025-26
language iconENGLISH
book iconUnlimited access till final school exam
tick
School Full course for CBSE students
PhysicsPhysics
Social scienceSocial science
ChemistryChemistry
MathsMaths
BiologyBiology
EnglishEnglish
₹41,000 (9% Off)
₹37,300 per year
Select and buy