Project Euler 108 - Diophantine Reciprocals I

Official link: https://projecteuler.net/problem=108