summaryrefslogtreecommitdiff
path: root/progs/a748.py
blob: 2378f61986c69288624e9eaac24407d71674b7f5 (plain)
1
2
3
4
5
6
7
8
def get_perrin(n):
  if (n == 0):
    return 3
  if (n == 1):
    return 0
  if (n == 2):
    return 2 
  return get_perrin(n - 2) + get_perrin(n - 3)