Answer to Project Euler questions implemented in Ruby