0%

Problem 192


Problem 192


Best Approximations

Let x be a real number.
A best approximation to x for the denominator bound d is a rational number r/s in reduced form, with s ≤ d, such that any rational number which is closer to x than r/s has a denominator larger than d:

|p/q-x| < |r/s-x| ⇒ q > d

For example, the best approximation to √13 for the denominator bound 20 is 18/5 and the best approximation to √13 for the denominator bound 30 is 101/28.

Find the sum of all denominators of the best approximations to √n for the denominator bound 1012, where n is not a perfect square and 1 < n ≤ 100000.


最佳逼近

x是一个实数。
对于x,分母上限为d的最佳逼近,是一个最简分数形式的有理数r/s,其中s ≤ d,使得所有比r/s更接近x的有理数其最简分数形式的分母都大于d:

|p/q-x| < |r/s-x| ⇒ q > d

例如,对于√13,分母上限为20的最佳逼近是18/5,而分母上限为30的最佳逼近是101/28。

对于所有满足1 < n ≤ 100000的非平方数n,找出其分母上限为1012的最佳逼近,并求出所有这些有理数的分母之和。