Scala Euler problems