ASCIi Group

Site Seekers

Each month, a member of the group will give a brief presentation on web sites. Some members present sites based on the same theme (for example, real estate), others tell us about sites that cover a broad range of subjects.

2006


Fibonacci Calculations

Columns:

n sequential number (current iteration)
fib Fibonacci number (sum of previous two Fibonacci numbers)
sq square of current Fibonacci number
cum accumulation of squares
prod current Fibonacci number times next Fibonacci number
~Phi next Fibonacci number divided by current Fibonacci number
~phi previous Fibonacci number divided by current Fibonacci number

n fib sq cum prod ~Phi ~phi
 
1 1 1 1 1 1.0 0.0
2 1 1 2 2 2.0 1.0
3 2 4 6 6 1.5 0.5
4 3 9 15 15 1.666667 0.666667
5 5 25 40 40 1.6 0.6
6 8 64 104 104 1.625 0.625
7 13 169 273 273 1.615385 0.615385
8 21 441 714 714 1.619048 1.619048
9 34 1156 1870 1870 1.617647 0.617647
10 55 3025 4895 4895 1.618182 0.618182
11 89 7921 12,816 12,816 1.617978 0.617978
12 144 20,736 33,552 33,552 1.618056 0.618056
13  233  54,289  87,841  87,841  1.618026  0.618026 

Note:
    cum = prod
    Phi = phi + 1

The fractional parts of Phi and phi (right of the decimal point) are equal.

Phi and phi are the aspect ratios of rectangles formed by drawing squares of Fibonacci numbers.

To perform these calculations, I wrote the following Microsoft Word macro (which you can copy and paste):


Fibonacci Macro

Sub Fibonacci() ' calculations demo

Dim fib(14)
fib(0) = 0
fib(1) = 1
cum = 0

Selection.TypeText Text:= _
    "Fibonacci Calculations" & vbCrLf & vbCrLf & _
    "Columns:" & vbCrLf _
    & vbCrLf & "n" & vbTab & _
        "sequential number (current iteration)" _
    & vbCrLf & "fib" & vbTab & _
        "Fibonacci number (sum of previous two Fibonacci numbers)" _
    & vbCrLf & "sq" & vbTab & _
        "square of current Fibonacci number" _
    & vbCrLf & "cum" & vbTab & _
        "accumulation of squares" _
    & vbCrLf & "prod" & vbTab & _
        "current Fibonacci number times next Fibonacci number" _
    & vbCrLf & "~Phi" & vbTab & _
        "next Fibonacci number divided by current Fibonacci number" _
    & vbCrLf & "~phi" & vbTab & _
        "previous Fibonacci number divided by current Fibonacci number" _
    & vbCrLf & vbCrLf & _
    "n" & vbTab & _
    "fib" & vbTab & _
    "sq" & vbTab & _
    "cum" & vbTab & _
    "prod" & vbTab & _
    "~Phi" & vbTab & _
    "~phi" & vbCrLf & vbCrLf

For cur = 1 To 13 ' current iteration n
    nxt = cur + 1 ' next
    prv = cur - 1 ' previous

    fib(nxt) = fib(prv) + fib(cur)
    sq = fib(cur) ^ 2

    cum = cum + sq
    prod = fib(cur) * fib(nxt)

    cap_phi = fib(nxt) / fib(cur)
    phi = fib(prv) / fib(cur)

    Selection.TypeText Text:= _
        cur & vbTab & _
        fib(n) & vbTab & _
        sq & vbTab & _
        cum & vbTab & _
        prod & vbTab & _
        Round(cap_phi, 6) & vbTab & _
        Round(phi, 6) & vbCrLf
Next

End Sub ' Fibonacci


Fibonacci Drawing

Suppose you lived about 2500 years ago and started drawing adjacent squares to form rectangles as I have drawn below. Each square has a side as large as the previous rectangle. After drawing several squares, you draw an arc in each square from corner to corner:

Fibonacci Squares and Arcs

Note the sizes of the squares (the Fibonacci numbers) and the ratios of the sides of the rectangles (that tend to Phi, the golden number).