Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

The Collatz (3x + 1) Problem
Author

Ilan Vardi
Organization: Wolfram Research, Inc.
Description

This package computes the iterates of the Collatz map: x -> x/2, if x is even; x -> (3x+1)/2, if x is odd, until an iterate reaches one of the four known cycles (the program runs on positive and negative integers).
Subject

*Mathematics > Number Theory
Keywords

Examples, Collatz problem, 3x+1 problem, Collatz, TotalStoppingTime, numerical sequences
URL

http://mathworld.wolfram.com/CollatzProblem.html
Downloads Download Wolfram CDF Player

Download
Collatz.m (4 KB) - Mathematica Package

Files specific to Mathematica 2.2 version:
Download
Collatz.m (4 KB) - Mathematica Package