Project Euler solutions in Ruby -- old code