refactored 1.Euler challenge using enumerable