Solution to #3.

matt@agon:~/programming/ruby/project-euler$ time ruby 3.rb
6857

real    0m1.830s
user    0m1.704s
sys     0m0.127s