FIBONACCI SEQUENCE
The Fibonacci sequence is defined by the following recursive equation
F
n+2
=
F
n
+
F
n+1
for n ≥ 0, F
1
= 0 and F
2
= 1
This is a recursive equation because to calculate say the tenth number, F
10
, the values of F
9
and F
8
are needed. It
is also possible to compute the values going forward. First the values of F
1
and F
2
are computed to get the value
of F
3
. The following table shows how to calculate the values.
An easy way to implement this is to define three variables, X, Y, and Z.
First initialize X and Y, X = F
1
= 0 and Y = F
2
= 1. Then the algorithm continues:
calculate the value of Z
= X + Y
= 0 + 1 = 1.
update the value of X, X = Y = 1.
update the value of Y, Y = Z = 1.
Then the second iteration would be (the second row in the table):
calculate the value of Z = X + Y = 1 + 1 = 2.
update the value of X, X = Y = 1.
update the value of Y, Y = Z = 2.
This set of operations can be repeated forever. The above table shows the results of the first 5 iterations. Each of
the X, Y, and Z columns contains the Fibonacci numbers, with X being one step behind Y, and Y one step behind
Z.
In the Fibonacci Microtonal Music, the numbers in the Y column are used to select the notes, and the numbers in
the X column are used to select the note durations.!