1999 AIME Problem 3

Attempt Problem 3 of the 1999 AIME below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 1999 AIME solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

3.

Find the sum of all positive integers nn for which n2−19n+99n^2 - 19n + 99 is a perfect square.
Answer: 38
Concepts:perfect squarecompleting the squaredifference of squares
Small hint:
Multiply by 44 and complete the square: 4(n2−19n+99)4(n^2 - 19n + 99) =(2n−19)2+35= (2n - 19)^2 + 35
Big hint:
If the expression equals k2,k^2, then (2k)2−(2n−19)2=35;(2k)^2 - (2n - 19)^2 = 35; factor 3535 as a difference of squares in every way
Solution:
Suppose n2−19n+99=k2.n^2 - 19n + 99 = k^2. Multiplying by 44 and completing the square gives (2n−19)2+35=(2k)2,(2n - 19)^2 + 35 = (2k)^2, so (2k−(2n−19))⋅(2k+(2n−19))=35. \begin{aligned} &\bigl(2k - (2n - 19)\bigr) \\ &\quad {}\cdot \bigl(2k + (2n - 19)\bigr) \\ &= 35. \end{aligned} The two factors sum to 4k>0,4k \gt 0, so both are positive: the factor pairs are (1,35),(1, 35), (5,7),(5, 7), (7,5),(7, 5), and (35,1).(35, 1).
Subtracting the first factor from the second gives 2(2n−19)=34,2(2n - 19) = 34, 2,2, −2,-2, or −34,-34, so n=18,n = 18, 10,10, 9,9, or 1.1. Each indeed makes the expression a perfect square (81,81, 9,9, 9,9, 8181), and the sum is 18+10+9+1=38.18 + 10 + 9 + 1 = 38.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.