Project Euler in Ruby