"Rick DeNatale" <rick.denatale / gmail.com> writes:

> Here are some results from my code for various bases.  Do these look
> like what others are seeing?  Has anyone uncovered a base 10 number
> which is happier than 8 steps to 1?  Unless my code has a bug in it'
> maybe I should state DeNatale's conjecture which is "There is a
> maximum happiness for numbers expressed in a base > 2"

That conjecture is false.

> Of course it might just be a lack of patience on my part.

Probably.

> one of the happiest 5 digit base 10 numbers is 78999, with 8 steps
> after 1287 probes

I propose that the number (10**78999 - 1)/9, that is, the number made
by:

 ("1" * 78999).to_i

takes 9 steps.  I strongly doubt that this method is the most
efficient way to get to a 9-step number; as a trivial adjustment, the
number

  ("1" * 24 + "9" * 975).to_i

is also a 9-step number.  However, if 78999 is the smallest 8-step
happy number, the smallest 9-step happy number must have at least
(78999/81.0).ceil digits.  Small wonder that you didn't find one...

-- 
s=%q(  Daniel Martin -- martin / snowplow.org
       puts "s=%q(#{s})",s.map{|i|i}[1]       )
       puts "s=%q(#{s})",s.map{|i|i}[1]