Project Euler Problem 784

Let's call a pair of positive integers p, q (p lt q) reciprocal, if there is a positive integer rlt p such that r equals

Project Euler Problem 784

Solution

Answer: 5833303012576429231

Working