Recursion Mathematics Series Python