Project euler solutions in scala