The bisection of the Fibonacci series, Sloane A001906 {1, 3, 8, 21, 55, 144,...}, naturally produces approximations to phi^2, by the division of the nth term by its predecessor: a(n)/a(n-1). ; e.g 55/21, 144/55, etc.
WolframAlpha also lists these fractions as convergents to 5pi/6.
In fact, there will always be a small shortfall between the two: (phi)^2 - 5pi/6 is not zero.
For sufficiently large n, how is the shortfall best approximated, in terms of a rational fraction, say 1/x?
To get continued-fraction approximations I used
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
pi = Atn(1) * 4
phi = (1 + Sqr(5)) / 2
x = phi * phi - 5 * pi / 6: y = 1
a = 1: b = 0
c = 0: d = 1
Text1.Text = Text1.Text & x & crlf
For i = 1 To 10
q = Int(x / y)
z = x - q * y
x = y: y = z
newa = c: newb = d
c = a - q * c: d = b - q * d
a = newa: b = newb
Text1.Text = Text1.Text & c & Str(d) & " " & Str(d / c) & crlf
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
The output was
4.01107584007607E-05
1 0 0
-24930 1 -4.01123144805455E-05
24931-1 -4.01107055473106E-05
-747929 30 -4.01107591763389E-05
1520789-61 -4.01107582971734E-05
-5310296 213 -4.01107584209995E-05
6831085-274 -4.01107583934324E-05
-18972466 761 -4.01107584011483E-05
120665881-4840 -4.01107584007115E-05
-139638347 5601 -4.01107584007708E-05
Indicating the difference itself is given as approximately 0.0000401107584007607 and successive approximations are
1/24930
1/24931
30/747929
61/1520789
213/5310296
...
5601/139638347
...
|
Posted by Charlie
on 2016-12-26 08:56:34 |