Project Euler problems solved in Ruby