A gap-at-most-two representation of must have at least two gaps equal to
ProvedErdos287.two_unit_gapsLet with and , and suppose every consecutive gap satisfies — that is, suppose the representation is a counterexample to Erdős problem #287. Then at least two of the gaps are equal to .
A gap- sequence breaks into maximal runs of step exactly , and consecutive runs have opposite parity, so a unit gap is precisely a parity switch. The theorem therefore says that a counterexample must contain at least three such runs, and in particular at least two blocks of even denominators.
The proof is a two-scale -adic argument. With at most one unit gap the denominators consist of at most two runs of step , one of which is even, say ; its reciprocal sum is . By Kürschák's lemma a block of consecutive integers has a unique element of maximal -adic valuation, so and hence the even run contributes -adic norm , while the remaining, all-odd, run contributes norm . The total therefore has -adic norm and cannot equal . The degenerate case in which every denominator is odd is excluded separately: there all gaps equal , so the denominators are every odd number in their range, and by Bertrand's postulate that range contains a prime past its midpoint — which cannot be a denominator.
Together with the classical result that the gaps cannot all equal , this narrows any hypothetical counterexample to a representation whose gap sequence mixes at least two s with the s.
import Mathlib
namespace Erdos287
theorem two_unit_gaps (k : ℕ) (hk : 2 ≤ k) (f : ℕ → ℕ)
(hf1 : ∀ i, i < k → 1 < f i)
(hmono : ∀ i j, i < j → j < k → f i < f j)
(hsum : ∑ i ∈ Finset.range k, (1 : ℚ) / f i = 1)
(hgap : ∀ i, i + 1 < k → f (i + 1) - f i ≤ 2) :
∃ i j, i ≠ j ∧ i + 1 < k ∧ j + 1 < k ∧
f (i + 1) - f i = 1 ∧ f (j + 1) - f j = 1 := by sorry
end Erdos287