An A166944 capped replay ends either quiet or by crossing the record
ProvedA166944Research.a166944_terminal_dichotomyLet be the OEIS A166944 recurrence, its offset from the identity, and the offset from the doubled index. A moving-horizon state is a pair with and ; a step from to is the first index where the increment exceeds , followed by the resulting state .
Suppose is such a state, and is an attained running maximum of the differences up to . Then the replay that follows from terminates in exactly one of two ways:
Along the way the path never violates the cap: stays an attained maximum at the intermediate index .
In words: a capped replay either runs out quietly -- no further nonunit increment appears before the horizon bound is reached, and the terminal state satisfies the fundamental identity -- or crosses the record, producing a difference strictly larger than .
This is the case split on which the whole terminal argument rests. The quiet branch is where the twin-prime certificates are produced: the tail is unit, and a long enough tail forces to have no small divisor. The crossing branch is where the record grows, and it is certified by the growth bound on the offset rather than by any factor information.
Why the dichotomy is not immediate. Termination is not built into the definitions: a step can in principle be followed by arbitrarily many further steps, and the horizon bound is what forces the process to stop. The bound is the least common multiple of the positive odd integers up to , which every increment is known to divide; once the offset exceeds it, no further old step is possible, so either a new record appears or the replay is finished.
import Definitions.Def_a166944_moving_horizon import Definitions.Def_a166944_B open A166944Research
namespace A166944Research
theorem a166944_terminal_dichotomy {M s C : Nat}
(hstate : IsMovingHorizonState s C) (hP : IsAttainedPreviousMaximum M s) :
∃ sf Cf p : Nat, HasMovingHorizonPathTo s C sf Cf p ∧
IsAttainedPreviousMaximum M sf ∧
((B Cf = 2 ∧ ∀ j : Nat, sf < j → j ≤ Cf → d j = 1) ∨
∃ r C' : Nat, IsMovingHorizonStep sf Cf r C' ∧ M < d r) := by
sorry
end A166944Research