The Oxford Math Interview
Question 2
Find all integers \(n\) such that \(n^2 + 20n + 11\) is a perfect square.

Assume there exists an integer \(a\) such that: \(n^2 + 20n + 11 = a^2\). The goal is to find all possible values for \(n\) and \(a\).

The truth is, this is not a textbook question and there is no standard method to solve this equation. Hence, the first thing you should do is play around with the terms. Is it possible to write the left-hand side as the product of two factors? Can you factorise \(n^2 - a^2\) ? Is it possible to complete the square with respect to \(n\)?

If you have spotted it, nice! You can indeed complete the square and rewrite \(n^2 + 20n + 11\) as \((n+10)^2 - 100 + 11\), which simplifies to \((n+10)^2 - 89\). Rearranging the equation then gives: $$(n+10)^2 - a^2 = 89$$

At this point, the next obvious step is to factorise the LHS: $$[(n+10) - a] \times [(n+10) + a] = 89$$ $$(n + 10 - a) \times (n + 10 + a) = 89$$

Both factors on the LHS are integers and their product is \(89\)... Yes, this is easy to solve! A quick runthrough the prime numbers from \(1\) to \(10\) tells you \(89\) is a prime, and so the only solutions to the above are:

  • \(1 \times 89 = 89 \)
  • \( 89 \times 1 = 89 \)
  • \((-1) \times (-89) = 89 \) (don't forget the negative solutions!)
  • \((-89) \times (-1) = 89 \)
  • So we must have:

  • \((n + 10 -a) = 1 \) and \( (n + 10 +a) = 89 \)
  • or, \( (n + 10 -a) = 89 \) and \( (n + 10 +a) = 1 \)
  • or, \( (n + 10 -a) = -1 \) and \( (n + 10 +a) = -89 \)
  • or, \( (n + 10 -a) = -89 \) and \( (n + 10 +a) = -1 \)
  • Solving each pair of equations (summing them together to make the \(a\)'s disappear for example) yields 2 possible values: \( n = 35\) and \(n = -55\). Now, remember to check that both these values satisfy the original condition!

  • If \(n = 35\), then \(n^2 + 20n + 11 = 1936 = 44^2 \)
  • If \(n = -55 \), then \( n^2 + 20n + 11 = 1936 = 44^2 \)

  • So the answer is \(n=35\) and \(n=-55\).

    If you solved this problem, congratulations, this is from a BMO past paper!