Recursive Function by jiang

def f(n):
  if n == 0:
    return 0
  elif n == 1:
    return 1
  elif n == 2:
    return 0
  else:
    return f(n-1)*f(n-3) +1

print f(37)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page