Project Euler in Scala