Skip to main content

2003 AIME I Problem 9

Problem 9 of 15IntermediateAlgebraNumber TheoryProblem-Solving Techniques

An integer between 10001000 and 9999,9999, 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?

Your answer

Integer from 0 to 999
Show solution

Solution

Group the balanced integers by the common sum ss of each digit pair, where 1≤s≤18.1 \le s \le 18. For s≤9,s \le 9, the leftmost pair (first digit at least 11) can be formed in ss ways and the rightmost pair in s+1s + 1 ways. For s≥10,s \ge 10, both digits of each pair must be at least s−9,s - 9, giving 19−s19 - s ways for each pair. The total count is ∑s=19s(s+1)+∑s=1018(19−s)2=∑s=19(s2+s)+∑k=19k2=2⋅285+45=615. \begin{aligned} &\sum_{s=1}^{9} s(s+1) + \sum_{s=10}^{18} (19 - s)^2 \\ &= \sum_{s=1}^{9} (s^2 + s) + \sum_{k=1}^{9} k^2 \\ &= 2 \cdot 285 + 45 = 615. \end{aligned}
AoPS wiki

Tagged: digits · casework · sum of first n squares

More practice