Sum of Positive n Making n^2 + 15n + 105 a Perfect Square
Board: Olympiad | Grade: Olympiad | Chapter: Diophantine Equations
Problem
Find the sum of all positive integers $n$ such that $n^2 + 15n + 105$ is a perfect square.
Step-by-Step Textbook Solution
Suppose $n^2 + 15n + 105 = k^2$ for some positive integer $k$. Because the linear coefficient $15$ is odd, multiply both sides by $4$ to avoid fractions when completing the square: $$4n^2 + 60n + 420 = 4k^2$$ $$(2n + 15)^2 - 225 + 420 = (2k)^2$$ $$(2k)^2 - (2n + 15)^2 = 195.$$ Factor the left-hand side and prime-factorize $195 = 3 \times 5 \times 13$: $$(2k - 2n - 15)(2k + 2n + 15) = 195.$$ Let $u = 2k - 2n - 15$ and $v = 2k + 2n + 15$. Since $n \ge 1$ and $k \ge 1$:
- $v = 2k + 2n + 15 > 0$, so $u = 195/v > 0$ as well.
- $v - u = 4n + 30 \ge 34$.
Since $195 = 3 \times 5 \times 13$ has $8$ positive divisors ($1, 3, 5, 13, 15, 39, 65, 195$), there are $4$ factor pairs $(u, v)$ with $u < v$:
- $(u, v) = (1, 195)$: $4n + 30 = 194 \implies 4n = 164 \implies n = 41$. (Check: $41^2 + 15(41) + 105 = 2401 = 49^2$.)
- $(u, v) = (3, 65)$: $4n + 30 = 62 \implies 4n = 32 \implies n = 8$. (Check: $8^2 + 15(8) + 105 = 289 = 17^2$.)
- $(u, v) = (5, 39)$: $4n + 30 = 34 \implies 4n = 4 \implies n = 1$. (Check: $1 + 15 + 105 = 121 = 11^2$.)
- $(u, v) = (13, 15)$: $4n + 30 = 2 \implies n = -7$ (rejected since $n > 0$).
Thus the valid positive integers are $n \in {1, 8, 41}$, and their sum is $$1 + 8 + 41 = 50.$$
NityaDhi Solution (Intuitive Method)
Use the Multiplier-4 Trick whenever $b$ is odd in $n^2 + bn + c = k^2$:
- Immediately write $4c - b^2 = 4(105) - 225 = 195 = (2k - 2n - 15)(2k + 2n + 15)$.
- Notice $195 \equiv 3 \pmod 4$, which guarantees that for EVERY divisor pair $(u, v)$ of $195$, one factor is $\equiv 1 \pmod 4$ and the other is $\equiv 3 \pmod 4$, so $v - u \equiv 2 \pmod 4$ and $n = \frac{v - u - 30}{4}$ is guaranteed to be an integer!
- Simply keep pairs with $v - u \ge 34$: $(1, 195), (3, 65), (5, 39)$, giving $n = 41, 8, 1$, sum $=$ $50$.
Common Mistakes to Avoid
- Using bounding inequalities $(n+7)^2 < n^2+15n+105$ carelessly: Bounding works when $n$ is large, but students frequently miss small solutions ($n=1, 8$) or miscompute the upper bound on $n$. Exact factoring via $4c - b^2$ finds ALL solutions cleanly.
- Including $n = -7$ from $(13, 15)$: Forgetting the constraint that $n$ must be a positive integer.