June 2024 - Solution
June 2024 Solution:
A solution for both parts is
A = 15780182746062370108602577733859373821827076136375073529796834518989107000489444222482943168070296 B = 5022988173858530362046589594815862687165616836922409678904106986969714780309239151669666891661530 C = 16560331448791934658922466325941893817186620274329261880232738682297512949234184663822339667675754
A generally useful approach for finding rational approximations of numbers is using continued fractions. Given the infinite continued fraction form of a number, one can obtain rational approximations from its convergents - the rational numbers obtained by taking a finite prefix of the continued fraction and computing it. The approximations obtained this way are the best approximations possible for fractions with denominator which is smaller or equal to the one in the approximation.
However, using the continued fraction approach on \pi would not yield approximations that are also a part of a Pythagorean triple. To ensure we have such a triple, we use Euclid's method (from "Elements" book X, proposition 29): given two integers, s,t we can generate a triple by
A = s^2-t^2 B = 2st C = s^2+t^2 Fix s. We are interested in finding the value of t such that \frac{A}{B}=\frac{s^2-t^2}{2st}=\pi. This leads to the simple quadratic equation t^2+(2s\pi)t-s^2=0 With the positive solution t=s\cdot D with D=\sqrt{\pi^2+1}-\pi. Thus, a pair s,t such that \frac{t}{s}=D will give a perfect approximation to \pi, but since we need s,t to be integers and D is irrational, we have to settle for an approximation; using the continued fraction method for D gives good approximations, solving the riddle.