\documentclass[10pt]{article} \usepackage[a4paper,margin=2.3cm]{geometry} \usepackage{amsmath,amssymb} \usepackage{booktabs} \usepackage[hidelinks]{hyperref} \title{Which cycle? A reproducible census of the $3n-1$ map\\ for starting values up to one million} \author{certXiv worked example (a teaching example, not a journal article)} \date{} \begin{document} \maketitle \begin{abstract} The $3n-1$ map sends an even positive integer $n$ to $n/2$ and an odd one to $3n-1$. Three cycles of this map are known, and it is conjectured, not proved, that every positive starting value enters one of them. For every starting value from $1$ to $10^6$ we record which cycle it enters and how many steps it takes. Every one of these starts enters one of the three known cycles: $327679$ enter the cycle containing $1$, $323351$ the cycle containing $5$ and $348970$ the cycle containing $17$. The slowest start is $858341$, which needs $553$ applications of the map to first reach a member of a cycle. Two short Python scripts that use only the standard library recompute the Collatz record quoted in the introduction, the table, the three cycle lengths and the slowest start, and fail if any of them differs from this paper. Together they run in a second or two. We make no claim about starting values above $10^6$, about the limiting behaviour of the three shares, or about the conjecture itself. \end{abstract} \section{Introduction} The Collatz map sends an even number $n$ to $n/2$ and an odd number $n$ to $3n+1$. The Collatz conjecture says that every positive starting value eventually reaches $1$. It is open; surveys are given by Lagarias \cite{lagarias1985,lagarias2021}. A well known exercise asks which starting value below one million (that is, from $1$ to $999{,}999$) takes the most steps to reach $1$, where a step is one application of the Collatz map. The answer is $837799$, with $524$ steps. Our first script, \texttt{verify\_1\_starter.py}, reproduces that answer. It is practice only, because the answer is known. This paper changes one sign and asks a different question. With $3n-1$ in place of $3n+1$ there is not one known cycle to fall into but three, so for each starting value there is something to find out: which cycle does it enter, and how long does that take? We answer this for every start up to one million, and we try to say exactly what the answer does and does not show. \section{Definitions} \label{sec:defs} Throughout, $n$ is a positive integer. The map $T$ is defined by \[ T(n) = \begin{cases} n/2 & \text{if $n$ is even,}\\ 3n-1 & \text{if $n$ is odd.} \end{cases} \] Both cases give a positive integer, so $T$ can be applied again and again. The \emph{trajectory} of a start $n$ is the sequence $n, T(n), T(T(n)), \dots$; we write $T^k(n)$ for the result of applying $T$ to $n$ exactly $k$ times, with $T^0(n)=n$. A \emph{cycle} is a finite set of distinct positive integers $\{c_0,\dots,c_{L-1}\}$ with $T(c_i)=c_{i+1}$ for $i