Your solution is definitely in the faster group Bob, though about a third as fast as the fastest (based on quick and dirty testing on my laptop.) In general your algorithm is pretty similar to the faster ones. You know, it seems like it would be useful to analyze all the solutions to possibly find Ruby "performance anti-patterns", since there are some wildly different performance numbers in the solutions for this quiz. If you think about it, people who complain about Ruby's performance may just be using some of these "performance anti-patterns", and could greatly increase performance with some knowledgeable tweaking. For example the blogger who was analyzing his web server logs and unnecessarily parsing a lot of dates, which slowed things down a lot. When I politely corrected him on this and he changed the code, performance greatly increased, and his view of Ruby improved a lot too [1]. Ryan 1. http://www.pankaj-k.net/archives/2005/11/revised_ruby_or.html On 12/5/05, Bob Showalter <bob_showalter / taylorwhite.com> wrote: > Here's my solution, made before peeking at any of the other submissions. > It's not too bad; generates the weird numbers up to 100,000 in about 3 > minutes on a pokey 233 Celeron. > > http://users.adelphia.net/~showaltb/rubyquiz/57/weird.rb > > Now I'm off to peek at the other solutions to see how bad my algorithm is!