Fork me on GitHub
Math for the people, by the people.

User login

Collatz tree

\documentclass{article}
% this is the default PlanetMath preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
%\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here
% suggested by user mps
\usepackage{pstricks}
\newcommand{\smallbox}{\psframe*(0,0)(0.9,0.9)}
\begin{document}
A {\em Collatz tree} or {\em Collatz graph} is a tree representation of several Collatz sequences joined together at their common terms the closer they are to the root term, which is 1. Typically the powers of 2 are placed in the central column, though placing to the left or the right are also viable options. In the following illustration, given to a height of 12, the powers of 2 are placed in the rightmost column:

% The following illustration was programmed by mps

\[\xymatrix{
96\ar[d] & 17\ar[dr] & 104\ar[d] & 106\ar[d] & 640\ar[d] & 672\ar[d] & 113\ar[dr] & 680\ar[d] & 682\ar[d] & 4096\ar[d] \\
48\ar[d] & & 52\ar[d] & 53\ar[dr] & 320\ar[d] & 336\ar[d] & & 340\ar[d] & 341\ar[dr] & 2048\ar[d] \\
24\ar[d] & & 26\ar[d] & & 160\ar[d] & 168\ar[d] & & 170\ar[d] & & 1024\ar[d] \\
12\ar[d] & & 13\ar[drr] & & 80\ar[d] & 84\ar[d] & & 85\ar[drr] & & 512\ar[d] \\
6\ar[d] & & & & 40\ar[d] & 42\ar[d] & & & & 256\ar[d] \\
3\ar[drrrr] & & & & 20\ar[d] & 21\ar[drrrr] & & & & 128\ar[d] \\
& & & & 10\ar[d] & & & & & 64\ar[d] \\
& & & & 5\ar[drrrrr] & & & & & 32\ar[d] \\
& & & & & & & & & 16\ar[d] \\
& & & & & & & & & 8\ar[d] \\
& & & & & & & & & 4\ar[d] \\
& & & & & & & & & 2\ar[d] \\
& & & & & & & & & 1
}\]

\begin{thebibliography}{1}
\bibitem{jl} J. C. Lagarias, ``The $3x + 1$ problem and its generalizations'', {\it Amer. Math. Monthly}, {\bf 92} (1985): 3 - 23
\end{thebibliography}

%%%%%
%%%%%
nd{document}