Attempts at Project Euler algorithms