There are n four-digit numbers of which each has at least one even and one odd digit. If S denotes the sum of all such four-digit numbers, find S + n .
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.
In the third line, you write 5 ( 4 2 1 ) ( 4 2 1 ) ( 4 2 1 ) = 5 4 9 9 2 1 , in what I assume is a sort of concatenation, but I think it would be clearer to write 5 × 1 0 3 + ( 4 2 1 ) × 1 0 2 + ( 4 2 1 ) × 1 0 1 + ( 4 2 1 ) × 1 0 0 = 5 4 9 9 2 1 .
Log in to reply
That's indeed what it represents. A bit funny for notation, perhaps, but pretty effective, I thought.
Problem Loading...
Note Loading...
Set Loading...
First, we find the count n a and the sum S a of all four-digit positive integers: n a = 9 × 1 0 3 = 9 0 0 0 ; of these 9000 numbers, the average value of the first digit is 5 , and that of the next three digits it is 4 2 1 , so that the average value of these numbers is 5 ( 4 2 1 ) ( 4 2 1 ) ( 4 2 1 ) = 5 4 9 9 2 1 , so that the sum is S a = 9 0 0 0 × 5 4 9 9 2 1 = 4 9 4 9 5 5 0 0 .
We will subtract out all number that have only odd digits. They are of the form a b c d where a , b , c , d ∈ { 1 , 3 , 5 , 7 , 9 } . n o = 5 4 = 6 2 5 ; their average value is 5 5 5 5 , so S o = 6 2 5 × 5 5 5 5 = 3 4 7 1 8 7 5 .
Likewise, the numbers with only even digits. They are of the form a b c d with a ∈ { 2 , 4 , 6 , 8 } and b , c , d ∈ { 0 , 2 , 4 , 6 , 8 } . Thus n e = 4 ⋅ 5 3 = 5 0 0 , and since their average value is 5 4 4 4 , we have S e = 5 0 0 × 5 4 4 4 = 2 7 2 2 0 0 0 .
The answers are therefore n = n a − n o − n e = 9 0 0 0 − 6 2 5 − 5 0 0 = 7 8 7 5 , S = S a − S o − S e = 4 9 4 9 5 5 0 0 − 3 4 7 1 8 7 5 − 2 7 2 2 0 0 0 = 4 3 3 0 1 6 2 5 , S + n = 4 3 3 0 9 5 0 0 .