euler solutions in python