The 3n + 1 problem

The 3n + 1 problem is deceptively simple. Consider a function f(n) and a sequence ai where:

f(n) = 3n+1 where n is odd
  n/2 where n is even

ai = n where i = 0
  f(ai-1) where i > 1

The Collatz conjecture states that ai will become 1 for some i regardless of what value of n is chosen initially. It remains to date a conjecture as there is no proof for it, but there is no counterexample either.

Continue reading