The 3n + 1 Problem    Spring 2014

A JavaScript implementation

The Conjecture: For any positive integer $ n $, the iterates

$ f^{1}(n) = f(n), f^{2}(n) = f(f(n)), f^{3}(n) = f(f^{2}(n)), \dots, f^{k}(n), \dots $

of the function

$$ f(n) = \left\{ \begin{array}{ll} \frac{n}{2} & {\text{ if }} n {\text{ is even}} \\ 3n + 1 & {\text{ if }} n {\text{ is odd}} \end{array} \right. $$

will eventually produce the value 1; that is, $f^{m}(n) = 1$ for some positive integer $m$.



Prof. A. O. Hausknecht, Mathematics, UMass Dartmouth