# Collatz 3n+1 Sequence

- Author:
- Marc Renault

This applet graphs the "3n + 1" sequence. Start with a value, and if it's even, divide it by two, but if it's odd, multiply by 3 and add 1. Repeat this process on the number you just produced. For example, if you start with 15, the following sequence results:
15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, ...
It is conjectured (but not proven) that any starting value produces a sequence that eventually includes the number 1; thereafter, the sequence continues 1, 4, 2, 1, 4, 2, 1, ... In the applet below, enter a starting value then click "Go" to see the sequence plotted out. If you click the "!" button, a random value is generated between 10 and 100,000 and the sequence is plotted. The sequence stops once the value 1 is attained.