Solving project euler problems with scala