Project Euler 3 Ruby