Skip to content

Instantly share code, notes, and snippets.

@singularitti
Created April 7, 2019 05:51
Show Gist options
  • Save singularitti/7f384470315c628e61defb7a4edc1c5e to your computer and use it in GitHub Desktop.
Save singularitti/7f384470315c628e61defb7a4edc1c5e to your computer and use it in GitHub Desktop.
Fibonacci sequence #Mathematica #math #recursive
fib[n_] := Which[n == 0, 0, n == 1, 1, n > 1, fib[n - 1] + fib[n - 2]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment