# Help with Calculating Convergents of a continued fraction (Semi-Urgent)

• Nov 3rd 2007, 06:36 AM
BruceBronson
Help with Calculating Convergents of a continued fraction (Semi-Urgent)
Hi, Say i have the continued fraction Sqrt(23) = [2,1,3,1,8] (1,3,1,8 reoccuring)

How do i calculate it's convergents? I can do it for a normal continued fraction but it appears to be done differently..

The solution has a table which reads as follows

4 4 1
1 5 1
3 10 4
1 24 5

Column 1 is obviously the continued fraction.. where do the convergents come from? It isn't at all obvious from looking at it to me...

Thank you
• Nov 3rd 2007, 12:16 PM
Soroban
Hello, Bruce!

Quote:

Say i have the continued fraction: . $\sqrt{23}\;=\;[4,\overline{1,3,1,8}]$

How do i calculate it's convergents?

The solution has a table which reads as follows

$\begin{array}{ccc}4 & 4 & 1 \\1 & 5 & 1 \\3 & 19 & 4 \\1& 24 & 5 \end{array}$

Column 1 is obviously the continued fraction.
Where do the convergents come from?

I'll try to explain the routine that I was taught . . .

Place the numbers in a row of a horizontal chart.

$\begin{array}{ccccccccccccc}n &|& 1 &|& 2 &|& 3 &|& 4 &|& 5 &| & \hdots \\ \hline a_n &|& 4 & | & 1 &|& 3 &|& 1 &|& 8 &|& \cdots \\ \hline p_n & | & & | & &|& &|& &|& &|& \cdots \\ \hline q_n & | & & | & &|& &|& &|& &|& \cdots \\\end{array}$

$p_1 = a_1,\;q_1 = 1$

$p_2 = a_2p_1 + 1,\;q_2 = a_2$

The table looks like this:

$\begin{array}{ccccccccccccc}n &|& 1 &|& 2 &|& 3 &|& 4 &|& 5 &| & \hdots \\ \hline a_n &|& 4 & | & 1 &|& 3 &|& 1 &|& 8 &|& \cdots \\ \hline p_n & | & 4 & | & 5 &|& &|& &|& &|& \cdots \\ \hline q_n & | & 1 & | & 1 &|& &|& &|& &|& \cdots \end{array}$

The rows can be completed with this strange move . . .

$\begin{array}{ccccccccccccc} a_n &|& 4 & & 1 & & 3 &\quad & 1 &\quad & 8 \\ & & & & &\swarrow \\ p_n & |& 4 & \leftarrow & 5 & & {\color{blue}19} \end{array}$

This is from: . $3 \times 5 + 4 \:=\:19$

The next $p$ comes from:

$\begin{array}{ccccccccccccc} a_n &|& 4 & & 1 & & 3 &\quad & 1 &\quad & 8 \\ & & & & & & & \swarrow \\ p_n & |& 4 & & 5 & \leftarrow & 19 & & {\color{blue}24} \end{array}$

From: . $1 \times 19 + 5 \:=\:24$

The $q$ rows are filled with an identical move . . .

$\begin{array}{ccccccccccccc}a_n &|& 4 & & 1 & & 3 &\quad & 1 &\quad & 8 \\ & & & & &\swarrow \\ q_n & |& 1 & \leftarrow & 1 & & {\color{blue}4} \end{array}$

From: . $3 \times 1 + 1 \:=\:4$

Then:

$\begin{array}{ccccccccccccc}a_n &|& 4 & & 1 & & 3 &\quad & 1 &\quad & 8 \\ & & & & & & & \swarrow \\ q_n & |& 1 & & 1 & \leftarrow & 4 & & {\color{blue}5} \end{array}$

From: . $1 \times 4 + 1 \:=\:5$

And the table can be completed:

$\begin{array}{ccccccccccccc} n &|& 1 &|& 2 &|& 3 &|& 4 &|& 5 &| & \hdots \\ \hline a_n &|& 4 & | & 1 &|& 3 &|& 1 &|& 8 &|& \cdots \\ \hline
p_n & | & 4 & | & 5 &|&19 &|& 24 &|& 211 &|& \cdots \\ \hline q_n & | & 1 & | & 1 &|& 4 &|& 5 &|& 44 &|& \cdots \end{array}$

The convergents are of the form: $\frac{p_n}{q_n}$

The convergents are:

. . $\begin{array}{ccc}\frac{4}{1} & = & 4.000000000 \\ \\ \frac{5}{1} & = & 5.000000000 \\ \\ \frac{19}{4} & = & 4.750000000 \\ \\ \frac{24}{5} & = & 4.800000000 \end{array}$

. . $\begin{array}{ccc} \frac{211}{44} & = & 4.795454545 \\ \\ \frac{235}{49} & = & 4.795918367 \\ \\ \frac{916}{191} & = & 4.795811518 \\ \\ \vdots & & \vdots\end{array}$

Note that the convergents are alternately above and below
. . the exact value of: . $\sqrt{23}\;=\;4.795831523...$