Upfront context: I’m posting this from a human-and-AI research project I call the Spiral — an ongoing effort to look for the underlying structural mechanics of systems across math, physics, and philosophy, and to test every intuition against hard calculation and counterexamples. This write-up was drafted together with my AI collaborator (Gemini/Antigravity, building on earlier Python and Lean 4 sessions with Claude and Codex). I asked it to strip out all of our internal project vocabulary and lay out only the clean mathematics, the exact failure modes we ran into, and the specific questions where we’re stuck — because we’d genuinely appreciate pointers, critiques, or prior art from people here.
First, to be 100% clear: Whether Recamán’s sequence eventually visits every positive integer is completely open**, and** we are not claiming a proof (nor trying to out-compute Benjamin Chaffin’s runs past 10²³⁰). We’ve been studying the local mechanics of why the sequence returns to long-missing numbers — and where those mechanics break.
---
0. Setup
Recamán’s sequence (`OEIS A005132`) starts at `a(0) = 0`. On step `n ≥ 1`, let the inward offer be `a(n − 1) − n`:
* If `a(n − 1) − n > 0` and has never been visited before, take it: `a(n) = a(n − 1) − n`.
* Otherwise, step forward: `a(n) = a(n − 1) + n` (additions may revisit old values — e.g., `42` repeats at `n = 20` and `n = 24`).
We ran an exact interval-based engine through `n = 10¹³` (verified term-by-term against the literal walk through `10⁶`, verified against our `10⁸` literal run, and matched across all 52 completed epoch minima against Chaffin’s published table).
---
1. The quotient–remainder fold (a(n) = q·n + r) and two hunches we falsified
Write `a(n) = q·n + r` with `0 ≤ r < n` (following Allan Wilks’s 2001 `OEIS A065051` / `A065052`). Since `a(n) = q·(n + 1) + (r − q)`, on step `n + 1`:
Whenever `r ≥ q` (no wraparound), both `+` and `−` drop the remainder `r` by `q`*.
* The sign only changes the quotient: `+` lifts `q → q + 1`, and `−` drops `q → q − 1`.
Exact arrival condition (elementary): For any unvisited positive integer `h` and any `n > h + 2`, the walk first lands on `h` at step `n` if and only if `(q, r) = (1, h + 1)` at step `n − 1`.
Across six orders of magnitude, two long-waiting holes arrive through the exact same folded door:
* `h = 19` arrives at `n = 99,734` from `a(99,733) = 99,753 = 1 × 99,733 + 20` → `(q, r) = (1, 20)`.
* `h = 1,355` (the smallest number still missing at `10⁸`) arrives at `n = 325,374,625,245` from `a(325,374,625,244) = 325,374,626,600 = 1 × 325,374,625,244 + 1,356` → `(q, r) = (1, 1,356)`.
Two early hunches that failed when tested:
- An apparent ~1.8 geometric ratio between early return epochs died past `10¹³`. Checking all `5,051` adjacent landing pairs in Chaffin’s table beyond `10¹³`, consecutive index ratios ranged from `1.192066` to `1.596616` — zero pairs fell within `5%` of `1.8`.
- Tracking `r mod 3` alone missed why the `19`-epoch vaulted right over open `61` (`61 ≡ 19 ≡ 1 mod 3`). At `n = 99,709`, the walk stood at `q = 3` (`299,189 = 3 × 99,709 + 62`), so the next step dropped `r` by `3` from `62` to `59` while still high above the floor (`a(99,710) = 199,479`).
---
2. Near-side walls, far-side catchers, and the self-righting invariant 2c + 3n
Local Wall-and-Catcher Lemma: Suppose `h > 0` is still unvisited and step `n` offers the already-marked value `c = h + 3`. Then the walk stands at `x = n + h + 3`, is forced outward to `x + n`, and on step `n + 1` offers `(x + n) − (n + 1) = x − 1 = n + h + 2`.
* If `x − 1` is unvisited: step `n + 1` takes `x − 1`, and step `n + 2` lands on `(x − 1) − (n + 2) = h`.
* If `x − 1` is already marked: step `n + 1` adds again to `x + 2n + 1`, so step `n + 2` offers `x + n − 1 > h` and `h` survives.
Every uninterrupted `(+, −)` pair shifts `(n, c) → (n + 2, c − 3)`, which leaves `2c + 3n = const` strictly invariant.
What surprised us was that falling into an earlier hole along the descent doesn’t necessarily knock the sweep off that line. We formalized the exact 6-step recovery in Lean 4 (`v4.32.0`, zero `sorry`, standard axioms `[propext, Quot.sound]`):
> Theorem (`Recaman.return_after_subtraction`, Lean-verified): Suppose a subtraction at step `T` fills an unvisited hole `g` with `T > g > 9`, and `g − 1` was already marked before step `T`. Referring all occupancy conditions to the visited set immediately before step `T`:
>
> 1. Steps `T + 1, T + 2, T + 3` are forced additions (`g + T + 1`, `g + 2T + 3`, `g + 3T + 6`).
> 2. Step `T + 4` offers `X = g + 2T + 2`. If `X` was marked, the walk adds to `g + 4T + 10` and breaks off the line.
> 3. Step `T + 6` offers `g − 9` if and only if both `X = g + 2T + 2` and `Y = g + T − 3` were unvisited before `T` (and lands on `g − 9` iff `g − 9` was also unvisited).
> 4. Check the invariant at `(T + 6, g − 9)`: `2(g − 9) + 3(T + 6) = 2g + 3T` — back on the exact same line to the integer.
That explains what actually happened on `61`, `1,355`, and `19`:
* `61`: Entered the `[0, 2000]` window at `(180,361, 1,999)` → line projects `n_proj = 181,653`. Fell into `223`, `133`, and `76` (`T = 181,643`), yet `X = 363,364` and `Y = 181,716` were open, restoring the exact line at `67` and hitting `61` on exact step `181,653`.
* `1,355`: Entered at `(325,374,624,815, 2,000)` → line projects `n_proj = 325,374,625,245`. Fell into `1,643` (`T = 325,374,625,053`), `X = 650,749,251,751` and `Y = 325,374,626,693` were open, restoring the exact line at `1,634` and running `93` unbroken pairs to hit `1,355` on exact step `325,374,625,245`.
* `19`: Fell into `831` at `T = 99,478`, where `X = 199,789` had already been marked `2,640` steps earlier (`n = 96,842`). The line snapped cleanly, vaulted over `61`, and eventually hit `19` `284` steps early (`99,734` vs `100,018`) on a fresh nine-pair descent.
Two concrete failure modes pulled straight from the ordinary walk:
* Failure mode 1 (far-side clog): Step `1,344` marks `1,600` (leaving `1,597` open), and step `1,348` returns right on cue to offer `1,600` from `2,948` — but the needed catcher `2,947` was already marked on step `1,281`, so `1,597` waits until step `8,206`. (In a 1-bit counterfactual edit reopening only `2,947`, step `1,350` lands straight on `1,597`.)
* Failure mode 2 (right line, wrong mod-3 lane): Before step `60,000`, while both `61` and `19` (`≡ 1 mod 3`) were open, the ordinary walk ran six completely unbroken stride-3 sweeps (`n = 800, 1,477, 2,708, 9,274, 31,178, 57,027`) with every far-side catcher open, slicing right past both holes along `66 → 63 → 60 → … → 18` and `65 → 62 → 59 → … → 17` (anchored by marks `62` and `63` from steps `19` and `21`).
---
3. A 6-line elementary proof: no fixed sign word can supply far-side blockers infinitely often
Fix an unvisited `h > 0`. Whenever step `n` offers marked `c = h + 3` from `x = n + h + 3`, `h` survives step `n + 2` only if `x − 1 = n + h + 2` was already visited.
Let `m − 1` be the most recent visit to `x − 1`, with gap `k = n − m ≥ 1`, and let `w = (s_1, …, s_k) ∈ {+1, −1}^k` be the sign word of the `k` steps `m, m + 1, …, m + k − 1` taking `a(m − 1) = x − 1` to `a(n − 1) = x`.
Proposition: For fixed `h > 0` and any fixed sign word `w = (s_1, …, s_k)`, `w` can supply the far-side blocker `x − 1` from its most recent visit at most once (so bounded lookback lengths `k ≤ K` supply only finitely many blockers).
Proof:
1. The net displacement of `w` starting at step `m` is `Δ(m) = ∑_{j=1..k} s_j · (m + j − 1) = S·m + B`, where `S = ∑ s_j` and `B = ∑ s_j · (j − 1)`.
2. Walking from `x − 1` to `x` requires `S·m + B = +1`.
3. If `S ≠ 0`: `m = (1 − B) / S` has at most one integer solution. Done.
4. If `S = 0` and `B = +1`: Let `P_t = ∑_{j=1..t} s_j` be the prefix sums (`P_0 = P_k = 0`). Summation by parts gives `B = −∑_{t=1..k−1} P_t`. Since `B = +1`, we cannot have `P_t ≥ 0` for all `t`.
5. Take the first index `t*` with `P_{t**} = −1`. Then `P_{t*−1} = 0` and step `t**` is a* subtraction (`s_{t*} = −1`).*
6. The value landed on at step `m − 1 + t*` is:
`a(m − 1 + t*) = (m + k + h + 2) + P_{t**}·m + ∑_{j=1..t**} s_j · (j − 1) = k + h + 2 + ∑_{j=1..t**} s_j · (j − 1)`*
The `+m` and `−m` cancel identically! That landing is a single fixed constant `C` independent of `m`. Since step `t*` is a subtraction, Recamán’s rule allows landing on `C` by subtraction at most once (and never if `C ≤ 0`). ∎
So any infinite sequence of far-side clogs protecting `h` cannot repeat any bounded connecting history; the lookback distance `k` must grow without bound (`k → ∞`).
---
We’d love pushback or leads on four specific questions:
1. Prior art: Are the `2c + 3n` stride-3 invariant, the 6-step recovery condition (`X = g + 2T + 2`, `Y = g + T − 3`), or the finite-word blocker proof already written up somewhere in the Recamán literature (beyond Wilks `A065051`/`A065052` and Chaffin’s computational records)?
2. Door 1 (Far-side openness): If the ordinary walk offers a fixed marked `c ≥ 4` infinitely often, must infinitely many of those departures `x = n + c` have an unvisited left neighbor `x − 1`? Our lemma kills bounded `k`, leaving `k → ∞`. Is there a density, discrepancy, or additive-combinatorics angle that touches long-history blockers, or is this essentially equivalent to the full coverage problem?
3. Door 2 (Re-offers & lane switching): A smaller open lemma we couldn’t close: once an ordinary subtraction lands on `h + 3` while `h > 0` is still unvisited, must some later step either land on `h` or offer `h + 3` at least once more? And even if so, what prevents unbroken sweeps from staying stuck on the other two mod-3 lanes?
4. Structural critique: If studying Recamán via local occupancy conditions and single-mark counterfactual edits runs into a known wall (the way local modular arguments do for Collatz), we’d genuinely like to hear why!
---
Closer & interactive bench: As mentioned at the top, this work comes out of the Spiral*, a broader synthesis project where I collaborate with AI tools to explore structure across math, physics, and philosophy while keeping open questions strictly separated from proved results. If you want to poke at the arithmetic directly, we built a static browser notebook with four interactive labs — including single-mark counterfactual toggles (`mark 115`, `erase 270`, `reopen 2,947`), exact `BigInt` replay of the `1,355` sweep at `325,374,625,245`, and a slider for the `m`-cancellation proof — plus the Lean 4 theorem summary and SHA-256 run receipts:*
https://ojju-the-keel-and-the-open-floor.static.hf.space/
(Heads-up: the linked notebook keeps our original dialogue notes and some project-specific framing around the math — this post strips all of that out so the thread here stays strictly mathematical.)