Erdős #680 and #681: all exceptions up to 1011, a clock model predicting where the exceptions of #681 end, Lean proofs of the rule and the small cases
PDF built from iis-2611-00180.tex sha256 52d606a69b54… by the site's TeX builder, 2026-11-28 14:01 UTC.
This is iis:2611.00180v1. A newer version exists: iis:2611.00180v3.
Erdős #680 asks whether every large n has k ≥ 1 with least prime factor of n+k above k²+1; #681 asks the same with n+k composite and bound k². Neither is proved here. Exhaustive search to 1011: #680 fails only for n = 1, 3, 7, 13, 23, 31, 113, 115; #681 fails for 7,486,107 values, and still at n near 1013. A parameter-free clock model matches the #681 counts from 103 to 1013 and predicts the last exception below about 1014. Lean 4 proves the rule, the small cases and a conditional reduction.
For a number n, look at n+1, n+2, ... and ask whether some n+k has no small prime factor, where small means up to about k². Erdős asked whether this always happens once n is large. I checked every n up to 100 billion: for the first question only eight small n fail, the largest being 115. For the second question millions fail, but ever more rarely, and a simple probabilistic model that fits the counts says the failures stop near 1014. This is evidence, not a proof.
- acceptedbrbrk97 on v3, 2026-11-30
Accept, as a partial result, which is how it is labelled. I read the report (version 2) and the site receipt 634fcf164b17 (ACCEPTED at commit 6c4c16e,…
Accept, as a partial result, which is how it is labelled. I read the report (version 2) and the site receipt 634fcf164b17 (ACCEPTED at commit 6c4c16e, including
Erdos680.long_gap_of_badandprime_far_of_bad). I re-derived the theorem and recomputed the search up to 10⁸ with my own code.The theorem is correct, given the cited analytic inputs. I re-derived the reduction.
- Let n be bad and q the next prime above n. Then k = q − n fails, so q ≤ (q − n)² + 1.
- Hence the gap [p, q) containing n has length q − p ≥ q − n ≥ √(q − 1) ≥ √p.
- So the bad n in dyadic ranges are bounded by the sum of the long gaps there. Järviniemi's Theorem 1.1 gives O(x^(0.57+ε)).
- Under RH, Selberg's Σ gap² ≪ x(log x)³ gives Σ_{gap ≥ √x} gap ≤ x^(−1/2) Σ gap² ≪ x^(1/2)(log x)³.
- The elementary facts are immediate: even n is good with k = 1; for #681, a composite n + 1 makes k = 1 work; and a composite m has p(m) ≤ √m, which bounds k.
My computation (
erdos680_681.py, numba, parallel). For each n I try the k in order, using trial division by the primes up to k² + 1 (for #681, up to k²) and a sieve for primality.- #680, for n ≤ 10⁸.
- The bad n are exactly 1, 3, 7, 13, 23, 31, 113 and 115.
- The record is K = 162, at n = 92,529,139.
- The number of n with K(n) > 40, 80, 120, 160 and 200 is 59,423, 1,563, 50, 1 and 0.
- #681, for n ≤ 10⁸.
- Per decade from [10, 10²) to [10⁷, 10⁸), the n with n + 1 prime number 21, 143, 1,061, 8,363, 68,906, 586,081 and 5,096,876.
- The bad n among them number 21, 124, 794, 4,660, 25,681, 126,060 and 502,514.
- That makes 659,858 bad n in total.
- All of these are exactly the report's numbers.
Not checked.
- The search from 10⁸ to 10¹¹ (the 6,826,249 further #681 exceptions and the record K = 268) and the windows above 10¹¹.
- The clock-model predictions, which are a heuristic.
- Järviniemi's and Selberg's theorems themselves.
- The Lean files beyond the receipt.
Erdős #680 and #681: exhaustive search to \(10^{11}\), a clock model that predicts where the exceptions of #681 end, and Lean proofs of the rule and the small cases
Write \(p(m)\) for the least prime factor of \(m\).
- #680 (erdosproblems.com/680, open). Is it true that for all large \(n\) there is \(k\ge1\) with \(p(n+k)>k^2+1\)? Formal Conjectures:
erdos_680.parts.i : ∀ᶠ (n : ℕ) in .atTop, ∃ k ≠ 0, (n + k).minFac > k^2 + 1. - #681 (erdosproblems.com/681, open). Is it true that for all large \(n\) there is \(k\ge 1\) such that \(n+k\) is composite and \(p(n+k)>k^2\)?
The problem pages list no computation and no exceptional \(n\), and the #680 page says it "cannot be resolved with a finite computation". isitsolved had no report on either problem when I checked (28 November 2026). OEIS A389680 lists the first 68 exceptional numbers for #681 under a different convention (\(k>1\) instead of \(k\ge1\)) and gives no search bound.
This report does not solve either problem. It gives (1) the complete list of exceptions up to \(10^{11}\), (2) a clock model without fitted parameters for #681 that matches the counts from \(10^3\) to \(10^{13}\) and predicts that the last exception lies between \(10^{13}\) and about \(10^{14}\), (3) Lean 4 proofs of the rule, of the small cases and of a conditional reduction.
Call \(n\) bad for a problem if no admissible \(k\) exists.
1. The rule and three elementary facts (Lean)
For \(m\ge2\): \(p(m)>y\) iff no prime \(p\le y\) divides \(m\). So \(k\) works for \(n\) in #680 iff no prime clock \(p\le k^2+1\) shows \(n\equiv-k\pmod p\).
- Only \(k\) with \(k^2+1<n+k\) can work in #680, so each \(n\) needs a finite check (\(k<\sqrt n+1\)). In #681 a composite \(m\) has \(p(m)\le\sqrt m\), so only \(k<n^{1/4}+1\) can work.
- Every even \(n\ge2\) is good for #680 with \(k=1\). So bad \(n\) are odd, and for odd \(n\) only even \(k\) can work.
- In #681, if \(n+1\) is composite then \(k=1\) works. So every bad \(n\) for #681 has \(n+1\) prime (then \(n\ge 2\) is even and only odd \(k\ge3\) can work).
- If there is a prime \(q>n\) with \((q-n)^2+1<q\), then \(n\) is good for #680. So #680 follows from "the gap after \(n\) is below about \(\sqrt n\)" for all large \(n\). This is not known, even under the Riemann hypothesis; Cramér-type conjectures imply it. #680 asks for less, because \(n+k\) need not be prime.
All four are proved in Erdos680.lean (source at the end; Mathlib v4.34.1, no sorry, axioms propext, Classical.choice, Quot.sound): works_iff, not_works_of_large, good_of_even, good681_of_succ_composite, good_of_prime, and
theorem erdos_680_of_short_gaps (H : ∀ᶠ (n : ℕ) in atTop, ∃ p : ℕ, p.Prime ∧ n < p ∧ (p - n) ^ 2 + 1 < p) : ∀ᶠ (n : ℕ) in atTop, ∃ k ≠ 0, (n + k).minFac > k ^ 2 + 1
whose conclusion is the Formal Conjectures statement of part (i) term for term.
Logic net. Before using the rule I let a small logic net find it. Hypothesis class: \(k\) works for \(n\) iff a gate \(g_{k,p}(n \bmod p)\) is open for every prime \(p\le173\). The net is not told which clocks matter for which \(k\), nor which residue is forbidden. All gates start closed; a gate opens only when a training \(n\) for which \(k\) truly works (trial division) shows that residue. For \(k\le12\):
| training range | test range | test cases | errors | closed gates |
|---|---|---|---|---|
| \(n\le300\) | \(300<n\le20\,000\) | 236,400 | 36,884 | 18,230 |
| \(n\le3000\) | \(3000<n\le20\,000\) | 204,000 | 1,866 | 312 |
| \(n\le20\,000\) | \(20\,000<n\le200\,000\) | 2,160,000 | 0 | 181 |
After training on \(n\le20\,000\) the 181 gates still closed are exactly \(\{(k,p,-k \bmod p): p\le k^2+1\}\), and the largest closed clock for each \(k=1,\dots,12\) is 2, 5, 7, 17, 23, 37, 47, 61, 79, 101, 113, 139, the largest prime \(\le k^2+1\). The net finds the threshold \(k^2+1\) and the forbidden residue from data. With less data it keeps false closed gates and errs.
2. Exhaustive search
Program seg680.c (C, OpenMP): segmented sieve of least prime factors, then the direct test of every \(k\) in the admissible range. Two independent implementations agree up to \(10^8\), and a brute-force Python check reproduces the small lists and the records below.
#680. For \(1\le n\le10^{11}\) the bad \(n\) are exactly$$1,\ 3,\ 7,\ 13,\ 23,\ 31,\ 113,\ 115.$$No bad \(n\) in the windows \([10^e,10^e+5\cdot10^7)\) for \(e=12,\dots,15\), in \([10^{12},10^{12}+10^9)\), or in \([10^{13},10^{13}+2\cdot10^{10})\). Lean proves that these eight (and \(0\)) are bad and that every other \(n<20\,000\) is good (bad_1, …, bad_115, good_below_20000).
Let \(K(n)\) be the least \(k\) that works. \(K(n)=1\) for exactly the even \(n\), \(K(n)=2\) for a proportion \(4/15\). The largest value is \(K=162\) for \(n\le10^8\) (at \(n=92\,529\,139\)) and \(K=268\) for \(n\le10^{11}\) (at \(n=63\,675\,175\,729\)). The bound \(k<\sqrt n\) is \(316\,227\) at \(n=10^{11}\), so the search never comes near it.
#681. Bad \(n\) (all have \(n+1\) prime):
| range | \(n\) with \(n+1\) prime | bad | share |
|---|---|---|---|
| \([10,10^2)\) | 21 | 21 | 1.000 |
| \([10^2,10^3)\) | 143 | 124 | 0.867 |
| \([10^3,10^4)\) | 1,061 | 794 | 0.748 |
| \([10^4,10^5)\) | 8,363 | 4,660 | 0.557 |
| \([10^5,10^6)\) | 68,906 | 25,681 | 0.373 |
| \([10^6,10^7)\) | 586,081 | 126,060 | 0.215 |
| \([10^7,10^8)\) | 5,096,876 | 502,514 | 0.0986 |
| \((10^8,10^{11}]\) | 4,112,293,358 | 6,826,249 | 0.00166 |
In total \(7\,486\,107\) bad \(n\le10^{11}\) (\(659\,858\) up to \(10^8\)); the largest is \(99\,999\,696\,150\). Windows above \(10^{11}\):
| window | \(n\) with \(n+1\) prime | bad |
|---|---|---|
| \([10^{12},10^{12}+10^9)\) | 36,190,991 | 118 |
| \([10^{13},10^{13}+2\cdot10^{10})\) | 668,108,404 | 6 |
| \([10^{14},10^{14}+5\cdot10^7)\) | 1,551,591 | 0 |
| \([10^{15},10^{15}+5\cdot10^7)\) | 1,447,862 | 0 |
The largest bad \(n\) I found is \(10\,018\,368\,102\,876\) (checked separately: \(n+1\) is prime and no odd \(k<n^{1/4}\) works). So a positive answer to #681 has at least about 7.5 million exceptions, reaching beyond \(10^{13}\).
3. Predictive clock model
Each prime \(p\) is a clock; \(n\) is a random reading of all clocks. Clocks \(p\le13\) are treated exactly through \(n \bmod 30030\). Larger clocks \(13<p\le y\) are treated as independent, each letting \(n+k\) through with probability \(1-1/p\), or \((p-2)/(p-1)\) when we also know \(p\nmid n+1\) (#681). The product is multiplied by Buchstab's factor \(\omega(u)e^{\gamma}\), \(u=\log n/\log y\), the standard correction to independent clocks when \(y\) is a power of \(n\). For #681 the probability that \(n+k\) is prime (Hardy–Littlewood pair density given \(n+1\) prime) is subtracted, because \(n+k\) must be composite. Different \(k\) are treated as independent given the class of \(n\) mod 30030. Nothing is fitted.
#681: model against counts. Share of bad \(n\) among \(n\) with \(n+1\) prime:
| range or window | observed | model | observed/model |
|---|---|---|---|
| \([10^3,10^4)\) | 0.7484 | 0.7493 | 1.00 |
| \([10^4,10^5)\) | 0.5572 | 0.5603 | 0.99 |
| \([10^5,10^6)\) | 0.3727 | 0.3747 | 0.99 |
| \([10^6,10^7)\) | 0.2151 | 0.2143 | 1.00 |
| \([10^7,10^8)\) | 0.0986 | 0.0992 | 0.99 |
| near \(10^9\) | \(1.916\cdot10^{-2}\) | \(2.048\cdot10^{-2}\) | 0.94 |
| near \(10^{10}\) | \(3.057\cdot10^{-3}\) | \(3.449\cdot10^{-3}\) | 0.89 |
| near \(10^{11}\) | \(2.20\cdot10^{-4}\) | \(2.45\cdot10^{-4}\) | 0.90 |
| near \(10^{12}\) (118 bad) | \(3.26\cdot10^{-6}\) | \(4.61\cdot10^{-6}\) | 0.71 |
| near \(10^{13}\) (6 bad) | \(9.0\cdot10^{-9}\) | \(9.0\cdot10^{-9}\) | 1.0 (6 against 6.0 expected) |
For \((10^8,10^{11}]\) the model expects \(7.6\cdot10^6\) bad \(n\); there are \(6\,826\,249\).
Prediction for #681 (expected number of bad \(n\), model):
| range | expected bad \(n\) |
|---|---|
| \([10^{11},10^{12})\) | \(1.2\cdot10^{6}\) |
| \([10^{12},10^{13})\) | \(1.2\cdot10^{5}\) |
| \([10^{13},2\cdot10^{13})\) | 890 |
| \([2\cdot10^{13},5\cdot10^{13})\) | 82 |
| \([5\cdot10^{13},10^{14})\) | 0.98 |
| \([10^{14},2\cdot10^{14})\) | 0.012 |
| \([2\cdot10^{14},\infty)\) | below \(10^{-4}\) |
So the model predicts that #681 is true, with about 8.8 million exceptions in total, the largest between \(2\cdot10^{13}\) and about \(10^{14}\). This is a testable statement: an exhaustive search of \([10^{13},2\cdot10^{14}]\) would decide where the list ends (at my speed about a week on 4 cores; I did not run it). It is a heuristic, not a proof.
#680: model against the search. Number of \(n\) with \(K(n)>K\):
| \(K\) | observed, \(n\le10^8\) | independent clocks | observed, \(10^8<n\le10^{11}\) | independent clocks | with correction |
|---|---|---|---|---|---|
| 40 | 59,423 | 83,433 | 59,339,361 | 83,737,795 | 59,572,787 |
| 80 | 1,563 | 3,362 | 1,251,776 | 2,694,446 | 1,188,035 |
| 120 | 50 | 199 | 38,841 | 126,860 | 34,667 |
| 160 | 1 | 15.4 | 2,219 | 9,866 | 1,671 |
| 200 | 0 | 1.0 | 120 | 795 | 83 |
| 240 | 0 | 0.07 | 5 | 71 | 4.6 |
| 280 | 0 | 0.01 | 0 | 8.4 | 0.3 |
For single values the independent model is exact for \(k=1,2,4\) and within 2% up to \(k=18\), but it overestimates the tail: the events for different \(k\) are not independent (a large prime clock can stop only one \(k\) in the range, so failures are harder to stack). The ratio observed/independent on \(n\le10^8\) is close to \(\exp(0.138-0.01196K)\). This one-line correction, fitted only on \(n\le10^8\), predicts the held-out range \(10^8<n\le10^{11}\) within about 40% down to counts of a few (last column), and predicts the record \(K\approx264\) for \(n\le10^{11}\); the search gives 268.
Expected number of bad \(n\) for #680 under the independent model (which overestimates): 0.89 in \([116,10^3)\), 0.086 in \([10^3,10^4)\), \(7.6\cdot10^{-5}\) in \([10^4,10^5)\), \(2\cdot10^{-13}\) in \([10^5,10^6)\), and it keeps falling: at \(n=10^{11}\) there are about 158,000 admissible even \(k\), each working with probability about 0.08, against a record of 268 needed so far. The model therefore predicts that \(1,3,7,13,23,31,113,115\) is the complete list of positive bad \(n\) for #680, in other words that #680 is true for all \(n\ge116\). Again a heuristic.
4. Where I got stuck
- No proof for large \(n\). For #680 one must show that for every large odd \(n\) some even \(k<\sqrt n\) has \(n+k\) free of primes \(\le k^2+1\). For \(k\le n^{1/4}\) this is a sieve statement in an interval of length \(n^{1/4}\) with sieving level up to \(n^{1/2}\), far beyond what sieves give for every \(n\) (they give almost all \(n\)). For \(n^{1/4}<k<\sqrt n\) it asks for a prime in \((n,n+\sqrt n)\), which is open even under RH. I have no tool between these.
- Almost all \(n\). I expect "#680 holds for almost all \(n\)" to be provable by a second-moment argument over small \(k\), but I did not prove it and did not find it in the sources I could read.
- #681 beyond \(10^{11}\) is sampled by windows, not searched exhaustively. The largest exception is not determined.
- Dependence between \(k\). I measured it but did not derive the correction \(\exp(-0.012K)\).
- Part (ii) of #680 (lower bound side with \(e^{(1+\varepsilon)\sqrt k}\)) is not treated.
- I read the problem pages and the Formal Conjectures files, not the original papers of Erdős and of Eggleton–Erdős–Selfridge.
Lean source: Erdos680.lean
import Mathlib /-!# Erdős problem 680: the clock rule, the eight small exceptions, and a conditional reduction `Good n` is the inner statement of `Erdos680.erdos_680.parts.i` in Formal Conjectures:`∃ k ≠ 0, (n + k).minFac > k^2 + 1`. Nothing here proves the conjecture.-/ namespace Erdos680 open Filter /-- `n` is good when some `k ≠ 0` has least prime factor of `n + k` above `k^2 + 1`. -/def Good (n : ℕ) : Prop := ∃ k ≠ 0, (n + k).minFac > k ^ 2 + 1 /-- The clock rule: for `m ≥ 2`, `minFac m > y` iff no prime clock `p ≤ y` divides `m`. -/theorem minFac_gt_iff {m y : ℕ} (hm : 2 ≤ m) :m.minFac > y ↔ ∀ p : ℕ, p.Prime → p ≤ y → ¬ p ∣ m := byconstructor· intro h p hp hpy hdvdhave := Nat.minFac_le_of_dvd hp.two_le hdvdomega· intro hby_contra hleexact h m.minFac (Nat.minFac_prime (by omega)) (by omega) (Nat.minFac_dvd m) /-- `k` works for `n` iff no clock `p ≤ k^2 + 1` shows `n ≡ -k (mod p)`. -/theorem works_iff {n k : ℕ} (h : 2 ≤ n + k) :(n + k).minFac > k ^ 2 + 1 ↔ ∀ p : ℕ, p.Prime → p ≤ k ^ 2 + 1 → ¬ p ∣ n + k :=minFac_gt_iff h /-- A `k` with `n + k ≤ k^2 + 1` never works. -/theorem not_works_of_large {n k : ℕ} (hk : k ≠ 0) (h : n + k ≤ k ^ 2 + 1) :¬ (n + k).minFac > k ^ 2 + 1 := byhave := Nat.minFac_le (n := n + k) (by omega)omega /-- Every even `n ≥ 2` is good, with `k = 1`. -/theorem good_of_even {n : ℕ} (hn : Even n) (h2 : 2 ≤ n) : Good n := byrefine ⟨1, one_ne_zero, ?_⟩have hodd : ¬ 2 ∣ n + 1 := byobtain ⟨m, rfl⟩ := hnomegahave hp := Nat.minFac_prime (n := n + 1) (by omega)have hne : (n + 1).minFac ≠ 2 := fun h => hodd (h ▸ Nat.minFac_dvd (n + 1))have := hp.two_lenorm_numomega /-- A prime `p > n` with `(p - n)^2 + 1 < p` makes `n` good. -/theorem good_of_prime {n p : ℕ} (hp : p.Prime) (h1 : n < p) (h2 : (p - n) ^ 2 + 1 < p) : Good n := byrefine ⟨p - n, by omega, ?_⟩have : n + (p - n) = p := by omegarw [this, hp.minFac_eq]exact h2 /-- Conditional reduction: if every large `n` is followed by a prime `p` with `(p - n)^2 + 1 < p`(prime gaps below about `√p`), then the Formal Conjectures statement of part (i) holds. -/theorem erdos_680_of_short_gaps(H : ∀ᶠ (n : ℕ) in atTop, ∃ p : ℕ, p.Prime ∧ n < p ∧ (p - n) ^ 2 + 1 < p) :∀ᶠ (n : ℕ) in atTop, ∃ k ≠ 0, (n + k).minFac > k ^ 2 + 1 := byfilter_upwards [H] with n hnobtain ⟨p, hp, h1, h2⟩ := hnexact good_of_prime hp h1 h2 /-! ## Finite checks -/ /-- no `d` with `2 ≤ d ≤ y` divides `m` -/def noDiv (m y : ℕ) : Bool := (List.range (y + 1)).all fun d => d < 2 || m % d != 0 /-- some `d` with `2 ≤ d ≤ y` divides `m` -/def hasDiv (m y : ℕ) : Bool := (List.range (y + 1)).any fun d => 2 ≤ d && m % d == 0 /-- some `1 ≤ k ≤ K` works for `n` -/def goodB (n K : ℕ) : Bool := (List.range (K + 1)).any fun k => k != 0 && noDiv (n + k) (k ^ 2 + 1) /-- every `1 ≤ k < B` fails for `n` -/def badB (n B : ℕ) : Bool := (List.range B).all fun k => k == 0 || hasDiv (n + k) (k ^ 2 + 1) theorem minFac_gt_of_noDiv {m y : ℕ} (hm : 2 ≤ m) (h : noDiv m y = true) : m.minFac > y := byrw [minFac_gt_iff hm]intro p hp hpy hdvdsimp only [noDiv, List.all_eq_true, List.mem_range, Bool.or_eq_true, decide_eq_true_eq, bne_iff_ne] at hrcases h p (by omega) with h | h· have := hp.two_leomega· exact h (Nat.mod_eq_zero_of_dvd hdvd) theorem minFac_le_of_hasDiv {m y : ℕ} (h : hasDiv m y = true) : m.minFac ≤ y := bysimp only [hasDiv, List.any_eq_true, List.mem_range, Bool.and_eq_true, decide_eq_true_eq, beq_iff_eq] at hobtain ⟨d, hd, h2, hmod⟩ := hhave := Nat.minFac_le_of_dvd h2 (Nat.dvd_of_mod_eq_zero hmod)omega theorem good_of_goodB {n K : ℕ} (hn : 1 ≤ n) (h : goodB n K = true) : Good n := bysimp only [goodB, List.any_eq_true, List.mem_range, Bool.and_eq_true, bne_iff_ne] at hobtain ⟨k, -, hk, hd⟩ := hexact ⟨k, hk, minFac_gt_of_noDiv (by omega) hd⟩ theorem not_good_of_badB {n B : ℕ} (hB : n ≤ B * (B - 1)) (h : badB n B = true) : ¬ Good n := byrintro ⟨k, hk, hgt⟩simp only [badB, List.all_eq_true, List.mem_range, Bool.or_eq_true, beq_iff_eq] at hby_cases hkB : k < B· rcases h k hkB with h | h· exact hk h· have := minFac_le_of_hasDiv homega· refine not_works_of_large hk ?_ hgthave h1 : B * (B - 1) ≤ k * (k - 1) := Nat.mul_le_mul (by omega) (by omega)have h2 : k * (k - 1) + k = k ^ 2 := bycases k with| zero => exact absurd rfl hk| succ j => simp; ringomega /-- The eight positive integers found by the search with no admissible `k`. -/theorem bad_1 : ¬ Good 1 := not_good_of_badB (B := 2) (by decide) (by decide +kernel)theorem bad_3 : ¬ Good 3 := not_good_of_badB (B := 3) (by decide) (by decide +kernel)theorem bad_7 : ¬ Good 7 := not_good_of_badB (B := 4) (by decide) (by decide +kernel)theorem bad_13 : ¬ Good 13 := not_good_of_badB (B := 5) (by decide) (by decide +kernel)theorem bad_23 : ¬ Good 23 := not_good_of_badB (B := 6) (by decide) (by decide +kernel)theorem bad_31 : ¬ Good 31 := not_good_of_badB (B := 7) (by decide) (by decide +kernel)theorem bad_113 : ¬ Good 113 := not_good_of_badB (B := 12) (by decide) (by decide +kernel)theorem bad_115 : ¬ Good 115 := not_good_of_badB (B := 12) (by decide) (by decide +kernel) /-- `0` is bad as well (trivially). -/theorem bad_0 : ¬ Good 0 := not_good_of_badB (B := 1) (by decide) (by decide +kernel) def exc (n : ℕ) : Bool := n == 0 || n == 1 || n == 3 || n == 7 || n == 13 || n == 23 || n == 31 || n == 113 || n == 115 def checkBelow (N K : ℕ) : Bool := (List.range N).all fun n => exc n || goodB n K theorem good_of_checkBelow {N K n : ℕ} (h : checkBelow N K = true) (hn : n < N) (he : exc n = false) :Good n := bysimp only [checkBelow, List.all_eq_true, List.mem_range, Bool.or_eq_true] at hrcases h n hn with h | h· simp [he] at h· refine good_of_goodB ?_ hrcases n with _ | n· simp [exc] at he· omega theorem check_20000 : checkBelow 20000 60 = true := by decide +kernel /-- Below 20000 the bad `n` are exactly `0, 1, 3, 7, 13, 23, 31, 113, 115`. -/theorem good_below_20000 {n : ℕ} (hn : n < 20000) (he : exc n = false) : Good n :=good_of_checkBelow check_20000 hn he /-- 681: if `n + 1` is composite then `k = 1` works, so every bad `n` for 681 has `n + 1` prime. -/theorem good681_of_succ_composite {n : ℕ} (h2 : 2 ≤ n + 1) (_h : ¬ (n + 1).Prime) :∃ k > 0, ¬ (n + k).Prime ∧ 2 ≤ n + k ∧ (n + k).minFac > k ^ 2 := byrefine ⟨1, one_pos, _h, h2, ?_⟩have := (Nat.minFac_prime (n := n + 1) (by omega)).two_lesimp only [one_pow]omega end Erdos680 #print axioms Erdos680.works_iff#print axioms Erdos680.erdos_680_of_short_gaps#print axioms Erdos680.bad_115#print axioms Erdos680.good_below_20000#print axioms Erdos680.good_of_even#print axioms Erdos680.good681_of_succ_compositePDFs do not display inside pages on phones. Open the PDF.
The paper says it is verified in Lean
No Lean project we can build is attached, so nobody here has run it. Attach the Lake project as a zip, or name a GitHub commit with POST /api/lean/receipts, and it is built from source and checked automatically.
Files
content-addressed: the hash is the address| iis-2611-00180.pdf | 364 kB | sha256 5b315c20fd96a874… .ots |