So any four digit number "ABCD" where those are the individual digits, can be represented as follows:
1000A + 100B + 10C + D
First let's figure out how many 4 digit numbers can be formed:
= 4*4*4*4 = 256
Now this next part is going to be a bit tough to explain in words, but I'll try.
None of these 4 digits (1,2,3,4) is going to occur more often than an other since we have no preferences here. So what this means is, if you consider each digit place (A,B,C,D) : Out of the 256 numbers, 64 would have A = 1, 64 would have A = 2 and so on for all the digits and digit-places. So in short, if you add all of them up, you would have the following expression:
64*[ 1000*(1 + 2 + 3 + 4) + 100*(1 + 2 + 3 + 4) + 10*(1 + 2 + 3 + 4) + (1 + 2 + 3 + 4)]
= 64*10*[1111]
= 711040
I hope that made sense, if it didn't let me know and I'll try to explain it again
Cheers!












