Jacob Fugal wrote: > On 9/1/06, Hans Fugal <fugalh / xmission.com> wrote: >> And what stops it from being a 1x10^50 length period, or any arbitrary >> length? > > The period cannot be any larger than 1000. The largest period is > probably quite a bit smaller than this, but this is a upper bound. > Why? <mathematical proof proof /> > So, for those of you glossing over the math, the conclusion is that > applying the "happy function" to any number greater than or equal to > 1000 will necessarily result in a smaller number. > > Since the sequence can't loop if we're constantly decreasing (until we > get down to 999 or less), none of the numbers in a period can be > greater than 999 -- there's no way to get back *up* to any of those > numbers. > > So, for any loop resulting from a number, the space of numbers liable > to be in that loop is no larger than 1000 number (0 through 999). So > no loop can have a period greater than 1000. And that, my friends, is what stops it from being a 1x10^50 length period, or any arbitrary length. If the intent of the quiz was to be mathemeticians and figure all this mathy stuff out, I apologize for dragging it into the open.