daily pastebin goal

Neo-Fibonacci (recursive solution)

a guest Feb 11th, 2015 207 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #returns the nth Neo-Fibonacci number
  2. def neo_fib(n):
  3.     if n <= 3:
  4.         return 1
  5.     return neo_fib(n-1) + neo_fib(n-2) + neo_fib(n-3)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand