Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #returns the nth Neo-Fibonacci number
- def neo_fib(n):
- if n <= 3:
- return 1
- return neo_fib(n-1) + neo_fib(n-2) + neo_fib(n-3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement