math.NT — Number Theory
Sharp linear bounds for the EKG sequence
We prove that the EKG sequence satisfies for every , with equality only at and , respectively. Discovered by Jonathan Ayres, the sequence starts with and repeatedly takes the least unused positive integer sharing a factor greater than with its predecessor. This proves the sharp linear bounds conjectured by Lagarias, Rains and Sloane, who established coarse bounds at every index. Hofman and Pilipczuk proved the limits , and of on primes, their triples and the other terms, and Haver made these estimates explicit and formalized them in Lean. Our earlier second-order asymptotic also builds on Haver's work. We sharpen Haver's self-improving early-even bound with a shorter prime window and effective large-sieve constants, and control odd terms so that the analytic range meets a finite computation. Lean checks the deduction from the definition, conditional on computed premises; independent programs check those premises, and their correspondence with the formal statements was checked by reading the code. This work has not yet been reviewed by experts. The proofs, the Lean formalization, the programs and the text were produced by AI models, working under the author's direction.