Add linear recursion example in Python