From: James Edward Gray II Date: 2007-09-07T10:22:30+09:00 Subject: Re: Count and Say (#138) On Sep 6, 2007, at 2:40 PM, Phrogz wrote: > Ruby Quiz wrote: >> 0. LOOK AND SAY >> 1. TWO A ONE D ONE K ONE L ONE N TWO O ONE S ONE Y >> 2. ONE A ONE D SIX E ONE K ONE L SEVEN N NINE O ONE S TWO T TWO W >> ONE Y >> 3. ONE A ONE D TEN E TWO I ONE K ONE L TEN N NINE O THREE S THREE >> T ONE V >> THREE W ONE X ONE Y >> >> and so on. (Note the difference between this and the L&S sequence-- >> the letters >> are counted rather than read in order). Eric wants to know when >> the sequence >> enters a cycle, and how long that cycle is. Well? > > In case the string gets quite long, what is the canonical English > representation (for this quiz) of: > 101 - "One hundred one" or "One hundred and one"? (Not "One Oh One", I > suppose.) > > (From that answer I suppose I can extrapolate the answer for similar > edge cases, largely involving the presence of absence of the word > 'and'.) This has come up in past quizzes. Here's a line of thought from and oldy but goody: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/135449 James Edward Gray II