Mystery Guest from Number Theory

Gareth Rees gdr+google at ravenbrook.com
Wed Feb 20 10:41:52 EST 2002


jimd at vega.starshine.org (Jim Dennis) wrote in message news:<a501qd$1c3k$1 at news.idiom.com>...  
>  So, as odd as it sounds, I'd like to post the code that implements  
>  this here and see if anyone can name our mystery guest:  
>   
>  This should be pretty readable, for any whole number, if it's even   
>  cut it in half, otherwise multiply by three and add one.  Iterate until   
>  you get to one.  
  
This has many names, but is best known as the "Collatz Problem" or just
as the "3x+1" problem.  The Collatz Problem is to prove that every positive
integer eventually leads to 1 under the iteration of the function

    x -> 3x+1 (x odd)
    x -> x/2 (x even).  
  
The problem is unsolved.
See <http://mathworld.wolfram.com/CollatzProblem.html>.



More information about the Python-list mailing list