
#1
Apr611, 07:01 PM

P: 5

I need to find the sum of all 4536 numbers with distinct digits from 1000 to 10000 (so 4 digit numbers). Now, I developed a primary method for a solution but its too time consuming! anybody have any clever ideas?




#2
Apr611, 07:28 PM

HW Helper
P: 805

Are you allowed to make a program that calculates it?




#3
Apr611, 08:16 PM

P: 5

No. Do it analytically please.




#4
Apr611, 09:04 PM

P: 891

Sum of Numbers with distinct digiits?!Suppose you write the numbers down twice only in two columns. In the first column write then in the order 1000, 1001, 1002 ... 9999. In the second column you assume the numbers are written in reversed order. If I understand you there should be 9000 numbers in each column, not the 4536 total you mentioned in your post. Now suppose you add the pair in each row and put in column 3: 1000 + 9999 = 10999; 1001 + 9998 = 10999; 1002 + 9997 = 10999; ... 9999+1000 = 10999. How many 10999's will ther be in column 3 when you are done. What is the sum of these 10999's represent ( in respect to the sums of the numbers in columns 1 and 2)? Edit OK I think I see why there are only 4536 total numbers. Each of the four digits must be distinct!! That calls for a more specific solution. With each digit from 1 to 9 in the thousands position you have 9*7*6 total ways to write the remaining digits. So the total of the sum of the digits in the thousands position will be T(9) * 9*8*7 or 45*9*8*7. You use a slightly different method to total the digits from 1 to 9 in the 100's, 10's and 1's positions. Zeros dont count in the sum but they figure in the determination of how many of each digit there would be in the 1000's, 100's or 10's or 1's. 



#5
Apr611, 10:31 PM

P: 5

No, sorry. The digits of the numbers have to be distinct
doing what you explained would be a lot easier though just use n(n+1)/2 from 110,000 and then again from 11000 and subtract the second from the first 



#6
Apr711, 02:01 AM

P: 129

9*C(9,3)*3!=4536
4536/9=504 digit 1000 0 * 0 1 * 504 = 504 2 * 504 = 1008 ... 9 * 504 = 4536 sum = 22680 why 504 & 448? < ??? digit 100 0 * 504 = 0 1 * 448 = 448 ... 9 * 448 = 4032 sum = 20160 digit 10 ... digit 1 ... 20160*3 + 22680 = 83160 



#7
Apr711, 10:08 AM

P: 5

Sorry, No. There are 4536 numbers with each valuing above 1000. So, the SUM must be at least 4536,000 (BUT it is more!).




#8
Apr711, 01:39 PM

P: 360

I think that Xitami has the right idea, but left out some details. Let's consider
[tex]abcd = 10^3 a + 10^2 b + 10 c + d[/tex] where a, b, c, d are distinct integers between 0 and 9, and [itex]a \neq 0[/itex]. The problem is to sum all numbers abcd that meet these conditions. First, we sum the contributions from the leading digit. The leading digit can take any of the values 1, 2, ..., 9. For any choice of the leading digits there are 9x8x7 = 504 choices for the next three digits. Therefore, the sum of the leading digits is [tex]1 \cdot 10^3 \cdot 504 + 2 \cdot 10^3 \cdot 504 + \cdots + 9 \cdot 10^3 \cdot 504 = 45 \cdot 504 \cdot 10^3[/tex] Next we consider the contribution of the second digit to the sum. The second digit b can take any of the 10 values 0, 1, ..., 9. If b = 0, then there are again 9x8x7 choices for the remaining digits. For each choice of b = 1, 2, ..., 9, there are 8 possibilities for a (since a can't equal 0), 8 choices for c (since c can equal 0) and 7 choices for d, a total of 8x8x7 = 448. If b = 0, it contributes nothing to the sum, so we may disregard it. Therefore, the total contribution of the second digit to the sum is [tex]1 \cdot 10^2 \cdot 448 + 2 \cdot 10^2 \cdot 448 + \cdots + 9 \cdot 10^2 \cdot 448 = 45 \cdot 448 \cdot 10^2[/tex] The contributions of the third and fourth digits to the sum are handled similarly. I'll let you work it out from here. Post your final answer and I'll tell you if it agrees with mine. 



#9
Apr711, 08:32 PM

P: 891

PS I should have edited out the steps to find the sum of all 4 digit numbers as soon as I saw it irrelevant as it was a distraction from my final message. 



#10
Apr1011, 06:09 PM

P: 5

Petek, you were correct! Thank you! I verified the solution with a collegue. I summed the values up to be 24887520




#11
Apr1011, 06:50 PM

P: 891





#12
Apr1111, 03:54 AM

P: 129

+30240




#13
Apr1111, 09:21 AM

P: 66

My way:
If we allow for leading zeros (the numbers 01239876) the solution is quite obviously 4999.5 * 10!/(104)! (because every digit at every place is equiprobable) so if we just subtract off the 3 digit numbers we're good. We can calculate 3 digit numbers with the same method as above but this includes 2 digit numbers that aren't included in the 4 digit calculation... and so on... the final calculation is thus: 4999.5 * 10!/(104)!  499.5 * 10!/(103)! + 49.5 * 10!/(102)!  4.5 * 10!/(101)! 24,842,250 



#14
Apr1111, 09:41 PM

P: 891





#15
Apr1111, 10:34 PM

P: 66

Yeah, there's double counting here. For instance 0104 would be subtracted from the total erroneously.
Crud! 



#17
Apr1211, 05:22 PM

P: 891

the answer is 1111*9*8*7*45  111*8*7*45 or 24917760 


Register to reply 
Related Discussions  
Between any two distinct real numbers there is a rational number  Calculus & Beyond Homework  3  
Distinct number  Calculus & Beyond Homework  4  
sum of distinct primes  Linear & Abstract Algebra  5  
Let A be A set of n Distinct Elements.  Calculus & Beyond Homework  2  
distinct primes  Calculus & Beyond Homework  1 