Project Euler Scala solutions. Watch out, spoilers