How many 4 digit numbers, in which sum of middle numbers are larger than sum of outer numbers?
Answers
Answer:
Step-by-step explanation:
If "0123" is a four-digit number, the sum, S, of the first two digits is between 0 and 18 (19 possibilities).
- For S=0, "00" is the only choice for the first two digits. Same for last two.
- For S=1, "01" and "10" are the only two choices for the first (last) two digits. There are 2*2 4-digit numbers with S=1.
- For S=2, "02", "11", "20" are the only three choices for the first (last) two digits. There are 3*3 4-digit numbers with S=2.
- and so on. At S=9, there are ten choices and at S=10, there are nine choices.
Add those up and you get 1^2 + 2^2 + 3^2 + ... + 9^2 + 10^2 + 9^2 + ... + 1^2 = 2 * (1 + 4 + 9 + 16 + 25 + 36 + 49+ 64 + 81) + 100 = 670.
If you don't consider "0123" a four-digit number, that is fine. Just delete the numbers in the above 670 numbers that start with "0". For S=0, delete "0000"; for S=1, delete "0101" and "0110"; and so on, up to S=9. None of the numbers for S=10 and up can start with a zero. That means you subtract 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55.
670 - 55 = 615. Which is the same answer given by the program written by another commenter here.