Skip to content

Instantly share code, notes, and snippets.

@anewusername1
Created November 14, 2011 18:07
Show Gist options
  • Save anewusername1/1364634 to your computer and use it in GitHub Desktop.
Save anewusername1/1364634 to your computer and use it in GitHub Desktop.
fibonacci sequence 0(n)
# 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