Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 7.6.1 (Find some fractions $a/b$ such that $|\sqrt{2} - a/b| < 1/(\sqrt{5} b^2)$)
Exercise 7.6.1 (Find some fractions $a/b$ such that $|\sqrt{2} - a/b| < 1/(\sqrt{5} b^2)$)
Find two rational numbers satisfying
Answers
Proof. Since
the fractions and are suitable.
For more with Sagemath:
sage: dfc = continued_fraction(sqrt(2)); dfc [1; 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...] sage: cvg = [dfc.convergent(i) for i in range(7)]; cvg [1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169] sage: for f in cvg: ....: a,b = f.numer(), f.denom() ....: if abs(sqrt(2) - f) < 1/(sqrt(5)* b^2): ....: print(f) ....: 1 3/2 7/5 17/12 41/29 99/70 239/169
So all convergents up to are suitable. With further calculations, all convergents up to are convenient, so we may conjecture that all convergents of satisfy (to be verified). □