1

Question

Find the sum of all 3-digit natural numbers which contain at least one odd digit and at least one even digit.

Open in App

Solution

Let X denote the set of all 3-digit natural numbers

Let O have only odd digits and E have only even digits

Then X (O∪E) is the set of all 3-digit natural numbers having atleast one odd digit and atleast one even digit. The desired sum is therefore

Let O have only odd digits and E have only even digits

Then X (O∪E) is the set of all 3-digit natural numbers having atleast one odd digit and atleast one even digit. The desired sum is therefore

∑x∈Xx=∑y∈Yy−∑z∈Zz

∑x∈Xx=∑999j=1j−∑99k=1k

=999×10002−99×1002

=50×9891=494550

Consider O=(1,3,5,7,9). Suppose the digit in unit's place is 1. We can fill the digit in ten's place in 5 ways and the digit in hundred's place in 5 ways. Thus there are 25 numbers in the set O each of which has 1 in its unit's place. Similarly, there are 25 numbers whose digit in unit's place is 3; 25 having its digit in unit's place as 5; 25 with 7 and 25 with 9.

Thus the sum of the digits in unit's place of all the numbers in O is

25(1+3+5+7+9)=25×25=625

A similar argument shows that the sum of digits in ten's place of all the numbers in O is 625 and that in hundred's place is also 625. thus the sum of all the numbers in O is

625(102+10+1)=625×111=69375

Consider E=(0,2,4,6,8).

The digit in hundred's place is never 0. Suppose the digit in unit's place is 0. There are 4×5=20 such numbers. Similarly, 20 numbers each having digits 2,4,6,8 in their unit's place. Thus the sum of the digits in unit's place of all the numbers in E is

20(0+2+4+6+8)=20×20=400

A similar reasoning shows that the sum of the digits in ten's place of all the numbers in E is 400, but the sum of the digits in hundred's place of all the numbers in E is 25×25=500. Thus the sum of all the numbers in E is

500×102+400×10+400=54400.

The required sum is

494550−69375−54400=370775

∑x∈Xx=∑999j=1j−∑99k=1k

=999×10002−99×1002

=50×9891=494550

Consider O=(1,3,5,7,9). Suppose the digit in unit's place is 1. We can fill the digit in ten's place in 5 ways and the digit in hundred's place in 5 ways. Thus there are 25 numbers in the set O each of which has 1 in its unit's place. Similarly, there are 25 numbers whose digit in unit's place is 3; 25 having its digit in unit's place as 5; 25 with 7 and 25 with 9.

Thus the sum of the digits in unit's place of all the numbers in O is

25(1+3+5+7+9)=25×25=625

A similar argument shows that the sum of digits in ten's place of all the numbers in O is 625 and that in hundred's place is also 625. thus the sum of all the numbers in O is

625(102+10+1)=625×111=69375

Consider E=(0,2,4,6,8).

The digit in hundred's place is never 0. Suppose the digit in unit's place is 0. There are 4×5=20 such numbers. Similarly, 20 numbers each having digits 2,4,6,8 in their unit's place. Thus the sum of the digits in unit's place of all the numbers in E is

20(0+2+4+6+8)=20×20=400

A similar reasoning shows that the sum of the digits in ten's place of all the numbers in E is 400, but the sum of the digits in hundred's place of all the numbers in E is 25×25=500. Thus the sum of all the numbers in E is

500×102+400×10+400=54400.

The required sum is

494550−69375−54400=370775

0

View More

Join BYJU'S Learning Program

Join BYJU'S Learning Program