Solutions to euler project in Ruby