Here is a calculation to illustrate the main idea
Define the function f(x) = (x+2)/(x+1)
a function of this type is called a fractional linear transformation
Set
x0=1
and iterate using f(x)
x1=f(x0) = 3/2=1.5
x2=f(x1)= 7/5=1.4
x3=f(x2) = 17/12 ~ 1.4167
x4=f(x3)=41/29 ~ 1.4138
x5=f(x4)=99/70 ~ 1.4143
x6=f(x5) =239/169 ~ 1.4142
These fractions approximate, indeed converge to the square root of 2
It turns out that in this particular case these fractions are the best possible approximations for sqrt(2)
We know that 1.4142 are the 1st 6 digits of sqrt(2)
sqrt(2) ~ 1+f1 where
f1=0.4142....
1/f1 = 2+f2 where
f2=0.41421...
1/f2 = 2+f3 where
f3=0.41421...
actually f1=f2=f3=.... ad infinitum
This means that
sqrt(2) = 1+ 1/(2+1/(2+1/(2+...))))
The last expression is called a continued fraction
the numbers in it are obtained by subtracting away the whole part taking the reciprocal, subtracting away the whole part, etc
The amazing thing is that for square roots this process isn't random but repeats cyclically. For sqrt(2) the cycle is particularly simple
we start with 1 and after that all the #s we get are 2
The numbers
1
1+1/2=3/2
1+1/(2+1/2) = 7/5
1+1/(2+1/(2+1/2)) = 17/12
are the fractions that result from truncating the continued fractions
These fractions are the best possible approximations for sqrt(2) ("best possible" has a precise meaning that we don't need to get into here)
Now here is the punchline.
Notice how we get the same fractions by iterating f(x) and by doing the continued fraction expansion
This doesn't happen for all square roots.
More interestingly, there can be an infinite overlap in the two sequences of approximations
O'Dorney figured out when this happens
http://www.maa.org/abstracts/mf2010-abstracts.pdf
See page 13
He has not acquired a fortune; the fortune has acquired him. -- Bion