asimov
What is the sum of all 3 digit positive integers that can be formed using the digits 1, 5, and 8, if the digits are allowed to repeat within a number?
A. 126
B. 1386
C. 3108
D. 308
E. 13986
Method 1: Sum Each Column of Digits
We need positive integers having 3 digits.
S = __ __ __
We can make 3*3*3 = 27 such positive integers since we can fill in each of the 3 spaces in 3 ways. Now imagine writing these 27 numbers one below the other to add.
158
185
...
...
x 27 combinations
When we add them, noticing the symmetry we know that there will be 9 1's in units digits, 9 5's and 9 8's. So units digits will add up to (1+5+8)*9.
Similarly, tens digits will add up (1+5+8)*9*10.
Similarly, hundreds digits will add up (1+5+8)*9*100
Adding all of them:
(1+5+8)*9 + (1+5+8)*9*10 + (1+5+8)*9*100 = (1+5+8) * 9 * (1+10+100) = 14 * 9 * 111 = 13,986
Method 2: Direct Formula
Sum of all n digit numbers formed by n non-zero digits with repetition being allowed is:
n^(n−1)∗(sum of the digits)∗(111... n times)
9 * 14 * 111 = 13,986
Answer: E