Made the logic a function called euler1