Fibonacci numbers and PB

Bertil

Member
There are nine Fibonacci from 1 to 55 and 126 sets of five out of 9 could
be generated with a progrm, which I'm unable to use. Is anybody here
into Fibonacci numbers and if so, do you have a list of all 126 sets?

Bertil
 

GillesD

Member
Combinations from Fibonacci numbers

The first 9 Finonacci numbers are really 0, 1, 1, 2, 3, 5, 8, 13 and 21 but if you drop the 0 and 1 at the beginning, the 9 following numbers are: 1, 2, 3, 5, 8, 13, 21, 34 and 55.

If you can use Excel, the following macro will generate (and display in column A) all 5-number combinations possible from these 9 Fibonacci numbers.

Option Explicit

Sub Comb_Fibonacci()
' Generates all 5-number combinations made of 9 Fibonacci numbers
Dim N(9) As Integer
Dim A As Integer, B As Integer, C As Integer, D As Integer, E As Integer
Application.ScreenUpdating = False
N(1) = 1
N(2) = 2
For A = 3 To 9
N(A) = N(A - 2) + N(A - 1)
Next A
Range("A1").Select
ActiveCell.Value = "Combinations"
For A = 1 To 5
For B = A + 1 To 6
For C = B + 1 To 7
For D = C + 1 To 8
For E = D + 1 To 9
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = N(A) & "-" & N(B) & "-" & N(C) & "-" & N(D) & "-" & N(E)
Next E
Next D
Next C
Next B
Next A
Range("A1").Select
Application.ScreenUpdating = True
End Sub
 

Bertil

Member
Fibonacci numbers

Thank you Gilles, but I'm unable to do any programming.
However, somebody listed the 126 sets at rec.games.lottery

Bertil
 

Sidebar

Top