Created
November 14, 2011 18:07
-
-
Save anewusername1/1364634 to your computer and use it in GitHub Desktop.
fibonacci sequence 0(n)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the eight element in the fibonacci sequence is 21 | |
n = 8 | |
five_square = Math.sqrt(5) | |
(((1 + five_square)**n) - ((1 - five_square)**n)) / (2**n * five_square) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment