AMC 10 Step by Step

2012 AMC 10A Problem 22

P21-25~7 minPrint

The sum of the first mm positive odd integers is 212212 more than the sum of the first nn positive even integers. What is the sum of all possible values of nn ?

Log in to save your progress.
Show solution without answering

Key insight

The sums are m^2 and n(n + 1). Multiply by 4 to complete the square, giving a difference of two squares equal to 847 = 7 x 11 x 11.

Solution

1. The two sums. Look at small cases. The odd numbers: 1=11 = 1, 1+3=41 + 3 = 4, 1+3+5=91 + 3 + 5 = 9. The first mm odd numbers add to m2m^2. The even numbers: 2=1⋅22 = 1 \cdot 2, 2+4=6=2⋅32 + 4 = 6 = 2 \cdot 3, 2+4+6=12=3⋅42 + 4 + 6 = 12 = 3 \cdot 4. The first nn even numbers add to n(n+1)n(n + 1), because 2+4+⋯+2n2 + 4 + \cdots + 2n is twice 1+2+⋯+n1 + 2 + \cdots + n.
2. The equation. m2=n2+n+212m^2 = n^2 + n + 212.
3. Make a square. The right side is almost a perfect square. Multiply everything by 44, because 4n2+4n+1=(2n+1)24n^2 + 4n + 1 = (2n + 1)^2:
4m2=4n2+4n+848=(2n+1)2+847.4m^2 = 4n^2 + 4n + 848 = (2n + 1)^2 + 847.
So (2m)2−(2n+1)2=847(2m)^2 - (2n + 1)^2 = 847.
4. Factor. A difference of two squares factors: (2m−2n−1)(2m+2n+1)=847(2m - 2n - 1)(2m + 2n + 1) = 847.
5. Split 847. 847=7×121=7×11×11847 = 7 \times 121 = 7 \times 11 \times 11. The ways to write it as small factor times large factor are
1×847,7×121,11×77.1 \times 847, \qquad 7 \times 121, \qquad 11 \times 77.
The second bracket is the larger one, so call the small factor S=2m−2n−1S = 2m - 2n - 1 and the large one L=2m+2n+1L = 2m + 2n + 1.
6. Solve each case. Subtracting, L−S=4n+2L - S = 4n + 2, so n=L−S−24n = \frac{L - S - 2}{4}. Adding, L+S=4mL + S = 4m, so m=L+S4m = \frac{L + S}{4}.

S×LS \times LnnmmCheck m2−n(n+1)m^2 - n(n+1)
1×8471 \times 8478444=211\frac{844}{4} = 21121221244944−44732=21244944 - 44732 = 212
7×1217 \times 1211124=28\frac{112}{4} = 2832321024−812=2121024 - 812 = 212
11×7711 \times 77644=16\frac{64}{4} = 162222484−272=212484 - 272 = 212
  1. All three give positive whole numbers. The possible values of nn add to 211+28+16=255211 + 28 + 16 = 255.

The answer is (A) 255\boxed{\textbf{(A)}\ 255}.

Why this works

When a whole-number equation has two squares that are close together, turn it into "square minus square equals a number". Multiplying by 44 avoids fractions when completing the square. A difference of squares factors into two brackets, and a fixed number has only a few factor pairs, so the endless search becomes a short list.

Alternative approach

Let k=m−nk = m - n, which is at least 11. Then m2−n2=(m−n)(m+n)=k(2n+k)m^2 - n^2 = (m - n)(m + n) = k(2n + k), and this must equal n+212n + 212. Rearranging, n(2k−1)=212−k2n(2k - 1) = 212 - k^2, so
n=212−k22k−1.n = \frac{212 - k^2}{2k - 1}.
Try k=1,2,…,14k = 1, 2, \dots, 14 (for k=15k = 15 the top is negative). Only k=1,4,6k = 1, 4, 6 give whole numbers: n=211n = 211, 1967=28\frac{196}{7} = 28 and 17611=16\frac{176}{11} = 16. The sum is again 255255.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The first mm odd integers add to m2m^2, and the first nn even integers add to 2(1+2+⋯+n)=n(n+1)2(1 + 2 + \cdots + n) = n(n+1). The condition reads
m2=n2+n+212.m^2 = n^2 + n + 212.

The right side is nearly a perfect square. Multiply by 44 so that 4n2+4n+1=(2n+1)24n^2 + 4n + 1 = (2n+1)^2 appears:
4m2=(2n+1)2+847⟹(2m−2n−1)(2m+2n+1)=847.4m^2 = (2n+1)^2 + 847 \quad\Longrightarrow\quad (2m - 2n - 1)(2m + 2n + 1) = 847.

Factor 847=7⋅121=7⋅112847 = 7 \cdot 121 = 7 \cdot 11^2; its factor pairs are 1⋅8471 \cdot 847, 7⋅1217 \cdot 121 and 11⋅7711 \cdot 77. On the left, the second factor is the larger one, so for each pair (S,L)(S, L) we set 2m−2n−1=S2m - 2n - 1 = S and 2m+2n+1=L2m + 2n + 1 = L. Subtracting gives 4n+2=L−S4n + 2 = L - S, so n=L−S−24n = \frac{L - S - 2}{4} and m=L+S4m = \frac{L + S}{4}:

  • (1,847)(1, 847): n=211n = 211, m=212m = 212.
  • (7,121)(7, 121): n=28n = 28, m=32m = 32.
  • (11,77)(11, 77): n=16n = 16, m=22m = 22.

All three are positive integers; for instance 222−16⋅17=484−272=21222^2 - 16 \cdot 17 = 484 - 272 = 212. The possible values of nn sum to 211+28+16=255211 + 28 + 16 = 255.

The answer is (A) 255\boxed{\textbf{(A)}\ 255}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.