Games Magazine Wild Cards numbers game
The January 2020 edition of Games magazine had a Wild Cards puzzle that I couldn't solve, and the solution they gave doesn't provide the steps taken to arrive at the answer. There has to be a better way than trial and error.
Quote:
Can you find two threedigit whole numbers a and b such that both the following statements are true?
The difference between a and b is a threedigit perfect square.
The difference between the squares of a and b is either 1 less or 1 more than the product of a and b.
Hint: One of the numbers is prime.

The second statement can be expressed as:
a^{2}  b^{2} = ab ± 1
(a + b)(a  b) = ab ± 1
(a  b) = (ab ± 1) / (a + b)
a  b is a threedigit perfect square, listed here: 10^{2} to 31^{2}
I ruled out the top three, since the difference between two three digit numbers can't be more than 800. So, we're left with 10^{2} to 28^{2}, 19 possibilities for a  b.
If a or b is prime, that leaves 145 possibilities for either, listed here.
At this point, I couldn't figure out any way to simplify or narrow down the possibilities. Going forward, I could only see using trial and error, and there's way too many permutations to slog through.
And so Doper geniuses, I turn to you. What's the proper way to determine the solution? Here it is in spoiler tags, in case this stumps you too.
1
