Find the sum of all 3 digit natural numbers which contain at least one odd digit and at least one even digit.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let X denote the set of all 3-digit natural numbers; let O be those numbers in X having only odd digits; and E be those numbers in X having only even digits. Then X - (O ∪ E) is the set of all 3-digit natural numbers having at least one odd digit and at least one even digit.The desired sum is therefore x ∈ X ∑ x - y ∈ O ∑ y - z ∈ E ∑ z .
It is easy to find the first sum:
x ∈ X ∑ x = j = 1 ∑ 9 9 9 j - k = 1 ∑ 9 9 k = 2 9 9 9 × 1 0 0 0 − 2 9 9 × 1 0 0 = 5 0 × 9 8 9 1 =494550.
Consider the set O. Each number in O has its digits from the set {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(100 + 10 + 1) = 625 × 111 = 69375.
Consider the set E. The digits of numbers in E are from the set {0, 2, 4, 6, 8}, but 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 × 20 = 500. Thus the sum of all the numbers in E is 500 × 102 + 400 × 10 + 400 = 54400. The required sum is 494550 − 69375 − 54400 = 3 7 0 7 7 5