Bunuel wrote:
For a positive integer n, E(n) represents the sum of even digits of n. For example, E(148) = 4 + 8 = 12 and E(3821) = 8 + 2 = 10. What is the value of E(1) + E(2) + E(3) + … + E(2006) ?
A. 12,026
B. 12,024
C. 12,022
D. 12,020
E. 12,018
We can use the principle of counting to solve this question. An easy entry point into this question is to notice that the unit digit of each option is different, hence, if we are able to find the unit digit of the sum, we can safely choose the option.
Given: E(n) represents the sum of even digits of n
Let's take an example to understand this better
E(3821) = 8 + 2 = 10
We can write 3821 as 3000 + 800 + 20 + 1.
In this expanded form, only 800 and 20 contribute to the final sum. 800 contributes a value of 8, and 20 contributes a value of 2.
So, if we are able to find the number of occurrences of 2, 4,6, and 8 in the first 2006 natural numbers, we can add the contributions of each occurrence and obtain the sum.
Thousands place
The only even value that's possible in the thousands place = 2.
The number of times 2 appears in the thousands place = 7 (2000, 2001, 2002, 2003, 2004, 2005, and 2006).
The contribution made by 2 to the final sum = 2 * 7 = 1
4. (We will keep track of only the units digit)
Hundreds Place
The only values that are possible in the hundreds place = 2, 4, 6, and 8.
Let's find the number of times 2 appears in the hundreds place -
- Between 100 and 1000, the lowest value in which 2 appears at the hundreds place = 200
- Between 100 and 1000, the highest value in which 2 appears at the hundreds place = 299
- Number of terms (between 100 and 1000 in which 2 appears at the hundreds place) = 100
- The above analysis is also applicable to numbers between 1000 and 2000.
- Hence, the number of terms in which 2 appears at the hundreds place = 2 * 100 = 200
The same analysis holds true for 4, 6, and 8 as well. In other words, between 1 and 2000, each number appears 200 times at the hundreds place.
Sum contributed = (4 + 6 + 8 + 2) * 200 = XX
0 (we are not interested in the sum but the units digit; the unit's digit of the sum is 0)
Tens PlaceThe even values that are possible in the tens place = 2, 4, 6, and 8.
Let's find the number of times 2 appears in the tens place -
- Between 1 and 100, the lowest value in which 2 appears at the tens place = 20
- Between 1 and 100, the highest value in which 2 appears at the tens place = 29
- Number of terms (between 1 and 100 in which 2 appears at the tens place) = 10
- This pattern repeats after every hundred numbers. Hence, the pattern repeats 20 times between 1 and 2000.
- Hence, the number of terms in which 2 appears at the tens place = 20 * 10 = 200
The same analysis holds true for 4, 6, and 8 as well. In other words, between 1 and 2000, each number appears 200 times at the tens place.
Sum contributed = (4 + 6 + 8 + 2) * 200 = XX
0 (we are not interested in the sum but the units digit; the unit's digit of the sum is 0)
Unit PlaceThe even values that are possible in the hundreds place = 2, 4, 6, and 8.
Let's find the number of times 2 appears in the unit place -
- Between 1 and 10, the number of times 2 appears at the unit place = 1. Hence for every 10 numbers, 2 appear once.
- Between 1 and 2000, we have 200 such blocks of 10s.
- Hence, the number of terms in which 2 appears at the unit place = 200 * 1 = 200
The same analysis holds true for 4, 6, and 8 as well. In other words, between 1 and 2000, each number appears 200 times at the unit place.
Sum contributed = (4 + 6 + 8 + 2) * 200 = XX
0 (we are not interested in the sum but the units digit; the unit's digit of the sum is 0)
We have a few more numbers to consider after 2000.
2002
2004
2006
The contribution made by the values in the unit digit to the overall sum = 2 + 4 + 6 = 1
2Let's find the unit digit of the overall sum =
4 +
0 +
0 +
0 +
2 = 6
The value in option A ends with 6.
Option A