Recamán's sequence at high altitude
Clément Chardine
math.CO
Dec 2, 2026 · v1
math.NT
TL;DR
Main bounds on Recamán's sequence, the reduction to a walk game, and the consequences of W≤cD are formalized in about 1200 lines of Lean 4.
Abstract
Recamán's sequence starts at $0$, and its $n$th step subtracts $n$ if the result is non-negative and new, and adds $n$ otherwise. Beyond the trivial $a(n)\le n(n+1)/2$, the only upper bound on its growth that we know of is $6a(n)\le n^2+17n$, posed without a source as a benchmark problem. We show that, far above the values it has visited, the sequence follows a rule with no arithmetic in it: a $\pm1$ walk steps up exactly when some earlier stretch of it has a prescribed mean. This reduces the growth question to a game on $\pm1$ walks. A one-page argument then gives $\limsup a(n)/n^2\le3/26$, and a small verified search gives $1/14$. We then study the game itself. If its reach rate is positive, optimal plays converge to stationary walks that obey the rule at every step, with no opponent. Every inequality $W\le cD$, where $W$ counts the up-steps of a $\pm1$ word that satisfy the rule's condition and $D$ counts its down-steps, gives $\limsup a(n)/n^2\le(c-1)/(2c+2)$. We prove it for $c=2$. The case $c=1$, which we state as a conjecture, would give $a(n)=o(n^2)$, and we show that this is equivalent to subtractions having frequency $1/2$. We also describe the natural approaches to the conjecture that fail, with the words that refute them. The bounds on the sequence, the reduction to the game and the consequences of $W\le cD$ are formalized in Lean 4, in about 1200 lines.
Problem
The only known nontrivial upper bound on the growth of Recamán's sequence is 6a(n) ≤ n^2+17n, posed without a source as a Lean benchmark problem. The paper seeks better bounds on limsup a(n)/n^2 and a route to a(n)=o(n^2).
Approach
A master identity expresses a(n) through the balance walk (additions minus subtractions). Far above previously visited values, the sequence obeys a local rule with no arithmetic, which reduces the growth question to a game on ±1 walks whose reach rate is subadditive. Stationary forced walks characterize the reach rate, and inequalities W ≤ cD on witnessed up-steps versus down-steps translate into growth bounds. Statements marked 'Lean' are formalized in Lean 4, including a kernel check of about 80,000 positions.
Results
The paper proves limsup a(n)/n^2 ≤ 3/26 by a short argument and 1/14 by a verified search, and proves W ≤ 2D for every walk. The conjecture W ≤ D would give a(n)=o(n^2), which is shown to be equivalent to subtractions having frequency 1/2. Several natural proof approaches are refuted by explicit words.
| c | ρ ≤ | limsup a(N)/N² ≤ | W ≤ cD |
|---|
| 2 | 1/3 | 1/6 | proved |
| 8/5 | 3/13 | 3/26 | open |
| 4/3 | 1/7 | 1/14 | open |
| 1 | 0 | 0 | open |
Dial settings W ≤ cD and the resulting bounds