On Sat, 19 Jul 2008, Dave Bass wrote: > Some of these answers are ludicrously incomprehensible! For goodness' > sake, pity the poor b*gger who has to maintain your code. (It might even > be you.) > > Eric has shown how to do it. Put the restricted numbers in a Set or > Hash. It's easy to test for membership as you increment through the > numbers. If someone else has already shown how to do it, and you have nothing technical to say and nothing to add except some insults vaguely aimed at the rest of us who have tried to help the OP, please either don't write in or or try to add some value to what you write so that it isn't just grandstanding about how much higher your standards of simplicity and clarity are than ours. To start with, they're not :-) And it comes across as awfully uncollegial. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails July 21-24 Edison, NJ Advancing With Rails August 18-21 Edison, NJ See http://www.rubypal.com for details and updates!