Let $E(n)$ denote the sum of the even digits of $n$. For example, $E(123456789) = 2 + 4 + 6 + 8$. I tried
a = IntegerDigits[123456789]
and
Total[Select[a, EvenQ]]
Now, I want to find the sum $$S= E(1)+ E(2)+\cdots + E(2014).$$ I tried
tab = Table[i, {i, 2014}]
With the 2012-th, I tried
Total[Select[IntegerDigits[tab[[2012]]], EvenQ]]
But, I do not how to find the sum $S$. How can I do it with Mathematica?
Total[Select[IntegerDigits[number], EvenQ]]as a functionfand then useSum[f[n], {n, 1, 2014}]? – Mr.Wizard Dec 20 '13 at 10:41