This problem was inspired by the infamous problem 6 in the 1988 Math Olympiad:
When is a2+b2 divisible by (ab+1)2 where a and b are non-negative integers?
Thanks, in that the question led me to this Olympiad resource of problems and solutions.
https://artofproblemsolving.com/wiki/index.php?title=IMO_Problems_and_Solutions#1998
https://artofproblemsolving.com/wiki/index.php?title=1988_IMO_Problems/Problem_6