Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
calculating fibonacci number
fibonacci <- function(n) {
u <- (1+sqrt(5))/2
(u^n - (1-u)^n) / sqrt(5)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.