Project euler problem 1, solved using recursion in python