```On Feb 9, 2007, at 2:15 PM, James Edward Gray II wrote:

> On Feb 9, 2007, at 3:10 PM, Luke Ivers wrote:
>
>>>
>>> * Given a wondrous number Integer, produce the sequence (in an
>>> Array).  A
>>> wondrous number is a number that eventually reaches one, if you
>>> apply the
>>> following rules to build a sequence from it.  If the current number
>>> in the
>>> sequence is even, the next number is that number divided by two.
>>> When the
>>> current number is odd, multiply that number by three and add one to
>>> get
>>> the next
>>> number in the sequence.  Therefore, if we start with the wondrous
>>> number
>>> 15, the
>>> sequence is [15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5,
>>> 16, 8,
>>> 4, 2,
>>> 1].
>>>
>>>
>> One final question: you say "given a wondrous number"... does this
>> mean that
>> the input is guaranteed to be wondrous, and we therefore don't need
>> to check
>> it...
>
> Correct.
>
Not that there are any known positive numbers that are not wondrous...
indeed, it would be wondrous to find such a number.  Brute force
attacks from eight years ago place any non-wondrous number, should it
exist, above 2E16.

That said, there are three known cycles of /negative/ non-wondrous
numbers.

The real name of this problem is the Collatz Problem.

http://mathworld.wolfram.com/CollatzProblem.html

Dan

```