Attempting project Euler