Euler346 optimizing