solution to Michael's Integer Solutions - https://brilliant.org/mathematics-problem/michaels-integer-solutions/?group=1lR5Ri04PEdu