Difference between revisions of "2003 AIME I Problems/Problem 9"
Hastapasta (talk | contribs) |
Hastapasta (talk | contribs) (→Solution) |
||
Line 2: | Line 2: | ||
An [[integer]] between <math>1000</math> and <math>9999</math>, inclusive, is called ''balanced'' if the sum of its two leftmost [[digit]]s equals the sum of its two rightmost digits. How many balanced integers are there? | An [[integer]] between <math>1000</math> and <math>9999</math>, inclusive, is called ''balanced'' if the sum of its two leftmost [[digit]]s equals the sum of its two rightmost digits. How many balanced integers are there? | ||
− | == Solution == | + | == Solution 1== |
If the common sum of the first two and last two digits is <math>n</math>, such that <math>1 \leq n \leq 9</math>, there are <math>n</math> choices for the first two digits and <math>n + 1</math> choices for the second two digits (since zero may not be the first digit). This gives <math>\sum_{n = 1}^9 n(n + 1) = 330</math> balanced numbers. If the common sum of the first two and last two digits is <math>n</math>, such that <math>10 \leq n \leq 18</math>, there are <math>19 - n</math> choices for both pairs. This gives <math>\sum_{n = 10}^{18} (19 - n)^2 = \sum_{n = 1}^9 n^2 = 285</math> balanced numbers. Thus, there are in total <math>330 + 285 = \boxed{615}</math> balanced numbers. | If the common sum of the first two and last two digits is <math>n</math>, such that <math>1 \leq n \leq 9</math>, there are <math>n</math> choices for the first two digits and <math>n + 1</math> choices for the second two digits (since zero may not be the first digit). This gives <math>\sum_{n = 1}^9 n(n + 1) = 330</math> balanced numbers. If the common sum of the first two and last two digits is <math>n</math>, such that <math>10 \leq n \leq 18</math>, there are <math>19 - n</math> choices for both pairs. This gives <math>\sum_{n = 10}^{18} (19 - n)^2 = \sum_{n = 1}^9 n^2 = 285</math> balanced numbers. Thus, there are in total <math>330 + 285 = \boxed{615}</math> balanced numbers. | ||
Both summations may be calculated using the formula for the [[perfect square|sum of consecutive squares]], namely <math>\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}</math>. | Both summations may be calculated using the formula for the [[perfect square|sum of consecutive squares]], namely <math>\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}</math>. | ||
− | |||
== Solution 2 (Painful Casework) == | == Solution 2 (Painful Casework) == |
Revision as of 17:35, 29 April 2022
Problem
An integer between and , inclusive, is called balanced if the sum of its two leftmost digits equals the sum of its two rightmost digits. How many balanced integers are there?
Solution 1
If the common sum of the first two and last two digits is , such that , there are choices for the first two digits and choices for the second two digits (since zero may not be the first digit). This gives balanced numbers. If the common sum of the first two and last two digits is , such that , there are choices for both pairs. This gives balanced numbers. Thus, there are in total balanced numbers.
Both summations may be calculated using the formula for the sum of consecutive squares, namely .
Solution 2 (Painful Casework)
Call the number . Then . Set .
Clearly, .
If : The only case is or . 2 choices.
If : then since , or . There are 3 choices for : . here.
If : Clearly, because if so, the sum will be even, not odd. Counting , we have choices. Subtracting that, we have choices. Since it doesn't matter whether or , we have 4 choices for . So here.
If : Continue as above. choices for . choices for . here.
If : You get the point. .
If : .
If : .
If : .
If : .
Now we need to be careful because if , is not valid. However, we don't have to worry about .
If : . Same thing for . .
If : We start at . So .
Continue this pattern until . Add everything up: we have .
~hastapasta
See also
2003 AIME I (Problems • Answer Key • Resources) | ||
Preceded by Problem 8 |
Followed by Problem 10 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.