Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def A(n):
if n == 1:
return 1
elif n == 2:
return 4
return A(n-1) + 2*A(n-2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment