Max Number Recursion Stack Overflow Python Error Function Formula