Project Euler - Scala Implementation