Average of all 6 digit numbers that contain only digits $1,2,3,4,5$
Solution 1:
Given any of our numbers $x$ except $333333$, call $666666-x$ the partner of $x$. Note that the partner of the partner of $x$ is $x$. So, apart from $333333$, our numbers come in couples.
The average of any two partners is $333333$, and the solitary number is $333333$, so the average of all the numbers is $333333$.
Solution 2:
It's actually very simple and I'll give you a few hints.
Think about only the ones digit. It can only contain either 1, 2, 3, 4, or 5. Now I want to average only one digit numbers. So what's the average over all one digit numbers that contain only 1, 2, 3, 4, and 5?
Once you answer that question, think about this question. Does anything change if we consider the 10s digit? Or the hundreds? In other words, if we can do it for the ones digit, let's exploit what we already know for all the other digits.
Solution 3:
Don't want to completely give it away, but there are $5^6$ of these numbers as the first through sixth digits can all take on five different values. I'm sure there's something slicker you could do, but it should be easy to then sum them all up by evaluating the sum $$ \sum_{a=1}^5 \sum_{b=1}^5 \sum_{c=1}^5 \sum_{d=1}^5 \sum_{e=1}^5 \sum_{f=1}^5 (a \cdot 10^5+b \cdot 10^4+ c \cdot 10^3+d \cdot 10^2+ e \cdot 10^1 + f \cdot 10^0) $$ and dividing by the total number of them.
Solution 4:
$$(111111+111112+\cdots+555555)=$$ $$(100000\times 5^5+200000\times 5^5+\cdots+500000\times 5^5)+(10000\times 5^5+20000\times 5^5+\cdots+50000\times 5^5)+\cdots+(1\times 5^5+2\times 5^5+\cdots+5\times 5^5)$$