What is the sum of all the 4-digit numbers all of whose digits are odd?
The other tutor's answer is incorrect.
There are 5 ways to choose each digit as 1,3,5,7,or 9,
so the total number of 4 digit numbers with only odd
digits is 5^4 or 625. Think of all 625 numbers added
up like this:
1111
1113
1135
....
....
9995
9997
+9999
-----
Each of the 4 columns of 625 digits contains the
same number of 1's as 3's as 5's as 7's and as 9's.
Therefore each of the 4 columns of 625 digits
contains 125 1's, 125 3's, 125 5's, 125 7's, and 125 9's
So the sum of each column of digits is
125(1 + 3 + 5 + 7 + 9) = 125(25) = 3125
The column of thousands digits accounts for 3125000 toward the sum
The column of hundreds digits accounts for 312500 toward the sum
The column of tens digits accounts for 31250 toward the sum
The column of ones digits accounts for 3125 toward the sum
------------------------------------------------------------------
So the sum is is the sum of those numbers-> 3471875
An easier way to do it is to realize it is the same as if all
the digits were the average of the odd digits, which is 5. So
the answer is the same as if every number among the 625 were
replaced by 5555. So 5555×625 = 3471875.
Edwin