Project Euler Problem # 4 in Ruby