Project Euler solutions. Be aware of spoilers.