Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 7.3.2 (Evaluate $\langle 2,1,1,1,1,\ldots \rangle$ and $\langle 2,3,1,1,1,1,\cdots \rangle$)
Exercise 7.3.2 (Evaluate $\langle 2,1,1,1,1,\ldots \rangle$ and $\langle 2,3,1,1,1,1,\cdots \rangle$)
Evaluate the infinite continued fractions and .
Answers
Proof. By Lemma 7.8 and Problem 1,
With Sagemath:
sage: cg = continued_fraction([(2,),(1,)]);cg [2; (1)*] sage: cg.value() 1/2*sqrt5 + 3/2
Similarly,
Verification with Sagemath:
sage: K.<sqrt5> = QuadraticField(5) sage: x = 5/2 - (1/10) * sqrt5 sage: x.continued_fraction() [2; 3, (1)*]
□
2025-07-24 09:43