Member-only story
Nice Factoring Trick — 2023 UK Maths Challenge Problem
Did you ever learn “completing the rectangle”?

Problem 19 from the 2023 UK Senior Maths challenge asked about the rational expression (7n + 12)/(2n + 3). We are told this expression takes integer (whole number) values for certain integer values of n, and we’re asked to find the sum of all such integer values.
So it’s a number theory problem, and we are going to set up what’s called a Diophantine equation, meaning that in this equation we are only interested in finding integer solutions.
Trial and Error
There’s a few ways you could go about it, and a good first step is just to start plugging in n values. So if we plug in n = 0 we get 12/3 = 4, which clearly is an integer. But trying 1 and 2 does not give integers.

If we were to try even larger values of n, what we find is that the expression approaches a limit of 7/2 = 3.5.
