| New Reply |
Sum of Numbers with distinct digiits?! |
Share Thread | Thread Tools |
| Apr6-11, 07:01 PM | #1 |
|
|
Sum of Numbers with distinct digiits?!
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?
|
| Apr6-11, 07:28 PM | #2 |
|
Recognitions:
|
Are you allowed to make a program that calculates it?
|
| Apr6-11, 08:16 PM | #3 |
|
|
No. Do it analytically please.
|
| Apr6-11, 09:04 PM | #4 |
|
Blog Entries: 2
|
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. |
| Apr6-11, 10:31 PM | #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 1-10,000 and then again from 1-1000 and subtract the second from the first |
| Apr7-11, 02:01 AM | #6 |
|
|
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 |
| Apr7-11, 10:08 AM | #7 |
|
|
Sorry, No. There are 4536 numbers with each valuing above 1000. So, the SUM must be at least 4536,000 (BUT it is more!).
|
| Apr7-11, 01:39 PM | #8 |
|
|
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. |
| Apr7-11, 08:32 PM | #9 |
|
Blog Entries: 2
|
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. |
| Apr10-11, 06:09 PM | #10 |
|
|
Petek, you were correct! Thank you! I verified the solution with a collegue. I summed the values up to be 24887520
|
| Apr11-11, 03:54 AM | #12 |
|
|
+30240
|
| Apr11-11, 09:21 AM | #13 |
|
|
My way:
If we allow for leading zeros (the numbers 0123-9876) the solution is quite obviously 4999.5 * 10!/(10-4)! (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!/(10-4)! - 499.5 * 10!/(10-3)! + 49.5 * 10!/(10-2)! - 4.5 * 10!/(10-1)! 24,842,250 |
| Apr11-11, 09:41 PM | #14 |
|
Blog Entries: 2
|
|
| Apr11-11, 10:34 PM | #15 |
|
|
Yeah, there's double counting here. For instance 0104 would be subtracted from the total erroneously.
Crud! |
| Apr12-11, 12:39 PM | #16 |
|
|
Yes, I also got 24,917,760.
|
| New Reply |
| Tags |
| digit, distinct, number theory, sum |
| Thread Tools | |
Similar Threads for: Sum of Numbers with distinct digiits?!
|
||||
| Thread | Forum | Replies | ||
| 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 | ||