# Erdős #364 — result: **UNSOLVED** **Status: UNSOLVED.** I did not prove or refute the official statement `Erdos364.erdos_364` (`¬ ∃ n, n.Powerful ∧ (n+1).Powerful ∧ (n+2).Powerful`). There is no `Main.lean`, no attempt to report as successful and no chat log, and nothing was submitted. No accounts were created and no TAO was spent. ## What prior job 58bb39f6 gave me The launches repo at `3d3f3a0` has only an inventory for this target: `catalog/targets/erdos364-erdos-364/{formalized,counterexample}/Challenge.lean` and `metadata.json`. `catalog/triage.json` lists it as `"status": "NOT_INDIVIDUALLY_TRIAGED"`, `"literature": "UNVERIFIED"`. There are **no prior partial lemmas or attack records for #364** in that repo, so I wrote the lemmas below from scratch. ## Environment and the one deviation - Lean `4.35.0-rc2`. `lean --version` reports commit `11acb17ec6b07a8f9e9173e6845197929540936b`, which matches the pin. - Mathlib `065356127b1dc0016f66b7283ce0ce2c4055aa55`, set up with `lake exe cache get`. - **Formal Conjectures `6adcbe13…` could not be fetched.** The GitHub API answered `"No commit found for SHA: 6adcbe13652f4e7c69ad02a783465ae2a99d5cb3"` for google-deepmind/formal-conjectures. The task metadata says it is an audited patch on upstream base `7d1a8c99…`. I did not find a public source for it, and the `TaskSupport` module could not be obtained either. So I copied the two definitions the statement depends on, `Nat.Full` and `Nat.Powerful`, from upstream FC `FormalConjecturesForMathlib/Data/Nat/Full.lean` (main branch) into namespace `Vendored`. The task's `task-version.json` names exactly these as the statement's local constants (`Nat.Full`, `Nat.Powerful` in that module). - **UNVERIFIED:** I have not checked that these copies are hash-identical to the pinned `6adcbe13` definitions (`sha256:aa15b3b4…` for `Nat.Powerful`). Moving the lemmas onto the real `FormalConjectures.ErdosProblems.«364»` / `TaskSupport` imports needs the pinned FC checkout. - Official Challenge.lean was fetched unmodified from conjectures-io/conjectures-tasks@f5dab9b8 (`…-formalized/Challenge.lean`). Its sha256 is `0608e0e2a751e8156341b50347548b168730106e6f4230abdf041bc49cf52219`, which matches the trusted hash. It was not compiled, because FC/TaskSupport are missing. ## Compiled lemmas (all build, no `sorry`) | Lemma | Content | |---|---| | `triple_mod_four` | triple ⇒ `n % 4 = 3` | | `triple_mod_nine` | triple ⇒ `n % 9 ∈ {0,7,8}` | | `triple_mod_36` | triple ⇒ `n % 36 ∈ {7,27,35}` (Beckon's result, now formalised) | | `triple_mod_prime_sq` | for every prime p, a member of the triple divisible by p is divisible by p² | | `triple_iff_sq_sub_one` | ∃ triple ⇔ ∃ x>0 even, x powerful and x²−1 powerful | | `Powerful.mul`, `Powerful.of_mul_coprime` | closure under products / coprime factors | | `no_triple_below` | no triple with n < 2000, a kernel `decide` over a proved-sound checker | | `counterexample_constraints` | any counterexample has n ≥ 2000, n%36∈{7,27,35}, n(n+2) powerful | Note that, as formalised, `Powerful 0` holds (`powerful_zero`), because `primeFactors 0 = ∅`. The case n = 0 is still excluded because 2 is not powerful. The finite search is sound because `isPrimeB_sound` (trial division up to √p) and `findW_sound` (a prime that divides m exactly once ⇒ m is not powerful) are proved. Bound 10000 exceeded 10 min here and was dropped. ## lake build log (last lines, `lake build` in a fresh project, exit 0, real 3m23s) ``` ℹ [8931/8932] Built Erdos364Partial (184s) info: Erdos364Partial.lean:240:0: 'Vendored.triple_mod_36' depends on axioms: [propext, Classical.choice, Quot.sound] info: (lines 241-244: triple_mod_prime_sq, triple_iff_sq_sub_one, no_triple_below, counterexample_constraints: identical axiom list) Build completed successfully (8932 jobs). ``` `#print axioms` shows only propext, Classical.choice and Quot.sound, with no `sorryAx` and no `native_decide`. Lakefile: mathlib@06535612 + `lean_lib Erdos364Partial`; source in full below. ## Where the proof is stuck By `triple_iff_sq_sub_one`, a triple is the same thing as an even powerful x with (x−1)(x+1) powerful. Local (mod p²) conditions cannot rule this out: for each prime the residues {0, p²−1, p²−2} remain available, and every finite set of congruences is satisfiable by the CRT. Finite search only pushes the bound up. A proof needs a global Diophantine input. (abc gives only conditional finiteness; Pell-type x²−1 = a²b³ is classified only in special cases.) The exact gap is the statement `∀ x even, Powerful x → Powerful (x^2-1) → x = 0`, which is equivalent to the conjecture. ## Literature check - Wikipedia (Powerful number) calls this an open conjecture of Erdős, Mollin and Walsh, and gives the mod-36 condition and the abc-conditional finiteness. - Beckon, Rose-Hulman UMJ 20(2): proves the mod-36 condition, formalised here as `triple_mod_36`. - Chan, arXiv:2503.21485: covers only the special case where the middle term is a cube. Other special-family papers: **UNVERIFIED**, not opened. - erdosproblems.com/364 returned HTTP 403 to my fetcher. Its current status there is **UNVERIFIED** from this run; the FC file tags it `research open`. No source I found claims a solution. ## Second-agent re-check Not applicable, since nothing was solved. ## Erdos364Partial.lean (sha256 c076ca85917e8060f7e876aa29d880b79d7d86b96c7d603d366fc0d581304d5c) ```lean import Mathlib /-! # Erdős #364 — partial lemmas (UNSOLVED target) `Nat.Full` / `Nat.Powerful` are copied verbatim (definitions only) from Formal Conjectures `FormalConjecturesForMathlib/Data/Nat/Full.lean`, because the pinned FC commit `6adcbe13…` could not be fetched from the public FC repository. Namespace `Vendored` avoids any clash. -/ namespace Vendored def Full (k : ℕ) (n : ℕ) : Prop := ∀ p ∈ n.primeFactors, p^k ∣ n abbrev Powerful : ℕ → Prop := Full 2 /-- The exact official statement (same shape as `Erdos364.erdos_364`). -/ def Erdos364Statement : Prop := ¬ ∃ (n : ℕ), Powerful n ∧ Powerful (n + 1) ∧ Powerful (n + 2) lemma Powerful.sq_dvd {n p : ℕ} (h : Powerful n) (hp : p.Prime) (hd : p ∣ n) (hn : n ≠ 0) : p ^ 2 ∣ n := h p (Nat.mem_primeFactors.2 ⟨hp, hd, hn⟩) lemma powerful_zero : Powerful 0 := by simp [Powerful, Full] /-- A prime dividing `m` exactly once is a witness that `m` is not powerful. -/ lemma not_powerful_of_witness {m p : ℕ} (hp : p.Prime) (hd : m % p = 0) (hnd : m % (p * p) ≠ 0) : ¬ Powerful m := by intro h have hm : m ≠ 0 := by rintro rfl; simp at hnd have := h.sq_dvd hp (Nat.dvd_of_mod_eq_zero hd) hm rw [pow_two] at this exact hnd (Nat.mod_eq_zero_of_dvd this) /-- Products of powerful numbers are powerful. -/ lemma Powerful.mul {a b : ℕ} (ha : Powerful a) (hb : Powerful b) : Powerful (a * b) := by intro p hp rcases Nat.mem_primeFactors.1 hp with ⟨hpp, hpd, hab⟩ have ha0 : a ≠ 0 := by rintro rfl; simp at hab have hb0 : b ≠ 0 := by rintro rfl; simp at hab rcases (Nat.Prime.dvd_mul hpp).1 hpd with h | h · exact Dvd.dvd.mul_right (ha.sq_dvd hpp h ha0) b · exact Dvd.dvd.mul_left (hb.sq_dvd hpp h hb0) a /-- A coprime factor of a powerful number is powerful. -/ lemma Powerful.of_mul_coprime {a b : ℕ} (h : Powerful (a * b)) (hab : Nat.Coprime a b) : Powerful a := by intro p hp rcases Nat.mem_primeFactors.1 hp with ⟨hpp, hpd, ha0⟩ by_cases hb0 : b = 0 · subst hb0 have : a = 1 := by simpa using hab subst this; exact absurd hpd hpp.not_dvd_one have h2 := h.sq_dvd hpp (Dvd.dvd.mul_right hpd b) (mul_ne_zero ha0 hb0) have hpb : ¬ p ∣ b := fun hb => hpp.not_dvd_one (by have := Nat.dvd_gcd hpd hb; rwa [hab] at this) have hcop : Nat.Coprime (p ^ 2) b := Nat.Coprime.pow_left 2 ((Nat.Prime.coprime_iff_not_dvd hpp).2 hpb) exact hcop.dvd_of_dvd_mul_right h2 /-! ## Local (congruence) obstructions -/ /-- **Lemma A (mod 4).** In any powerful triple, `n ≡ 3 (mod 4)`, i.e. `4 ∣ n+1`. -/ theorem triple_mod_four {n : ℕ} (h0 : Powerful n) (h1 : Powerful (n + 1)) (h2 : Powerful (n + 2)) : n % 4 = 3 := by have a0 : n % 2 = 0 → n % 4 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_two a b h0 have a1 : (n + 1) % 2 = 0 → (n + 1) % 4 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_two a b h1 have a2 : (n + 2) % 2 = 0 → (n + 2) % 4 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_two a b h2 omega /-- **Lemma B (mod 9).** In any powerful triple, `n % 9 ∈ {0, 7, 8}`. -/ theorem triple_mod_nine {n : ℕ} (h0 : Powerful n) (h1 : Powerful (n + 1)) (h2 : Powerful (n + 2)) : n % 9 = 0 ∨ n % 9 = 7 ∨ n % 9 = 8 := by have a0 : n % 3 = 0 → n % 9 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_three a b h0 have a1 : (n + 1) % 3 = 0 → (n + 1) % 9 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_three a b h1 have a2 : (n + 2) % 3 = 0 → (n + 2) % 9 = 0 := fun a => by by_contra b; exact not_powerful_of_witness Nat.prime_three a b h2 omega /-- **Lemma C (mod 36).** In any powerful triple, `n % 36 ∈ {7, 27, 35}`. -/ theorem triple_mod_36 {n : ℕ} (h0 : Powerful n) (h1 : Powerful (n + 1)) (h2 : Powerful (n + 2)) : n % 36 = 7 ∨ n % 36 = 27 ∨ n % 36 = 35 := by have := triple_mod_four h0 h1 h2 have := triple_mod_nine h0 h1 h2 omega /-- **Lemma D (every prime).** For each prime `p`, either `p` divides none of the three, or `n % p^2 ∈ {0, p^2-1, p^2-2}` (the multiple of `p` is a multiple of `p^2`). -/ theorem triple_mod_prime_sq {n p : ℕ} (hp : p.Prime) (h0 : Powerful n) (h1 : Powerful (n + 1)) (h2 : Powerful (n + 2)) : ∀ m ∈ ({n, n + 1, n + 2} : Finset ℕ), p ∣ m → p ^ 2 ∣ m := by intro m hm hd simp only [Finset.mem_insert, Finset.mem_singleton] at hm rcases hm with rfl | rfl | rfl · by_cases hm0 : m = 0 · simp [hm0] · exact h0.sq_dvd hp hd hm0 · exact h1.sq_dvd hp hd (by omega) · exact h2.sq_dvd hp hd (by omega) /-! ## Reformulation: triples ↔ even powerful `x` with `x^2 - 1` powerful -/ /-- **Lemma E.** A powerful triple `(n, n+1, n+2)` is the same as an even powerful `x > 0` with `x^2 - 1` powerful (take `x = n + 1`). -/ theorem triple_iff_sq_sub_one : (∃ n, Powerful n ∧ Powerful (n + 1) ∧ Powerful (n + 2)) ↔ (∃ x, 0 < x ∧ 2 ∣ x ∧ Powerful x ∧ Powerful (x ^ 2 - 1)) := by constructor · rintro ⟨n, h0, h1, h2⟩ have h4 := triple_mod_four h0 h1 h2 refine ⟨n + 1, by omega, by omega, h1, ?_⟩ have : (n + 1) ^ 2 - 1 = n * (n + 2) := by rw [pow_two]; zify [show 1 ≤ (n + 1) * (n + 1) by nlinarith]; ring rw [this]; exact h0.mul h2 · rintro ⟨x, hx0, ⟨k, rfl⟩, hx, hsq⟩ obtain ⟨j, rfl⟩ : ∃ j, k = j + 1 := ⟨k - 1, by omega⟩ have heq : (2 * (j + 1)) ^ 2 - 1 = (2 * j + 1) * (2 * j + 3) := by rw [pow_two]; zify [show 1 ≤ 2 * (j + 1) * (2 * (j + 1)) by nlinarith]; ring rw [heq] at hsq have hcop : Nat.Coprime (2 * j + 1) (2 * j + 3) := by have hg1 := Nat.gcd_dvd_left (2 * j + 1) (2 * j + 3) have hg2 := Nat.gcd_dvd_right (2 * j + 1) (2 * j + 3) have hg : Nat.gcd (2 * j + 1) (2 * j + 3) ∣ 2 := by have := Nat.dvd_sub hg2 hg1 rwa [show 2 * j + 3 - (2 * j + 1) = 2 by omega] at this have hle := Nat.le_of_dvd (by norm_num) hg have hpos := Nat.gcd_pos_of_pos_left (2 * j + 3) (by omega : 0 < 2 * j + 1) unfold Nat.Coprime rcases (show Nat.gcd (2 * j + 1) (2 * j + 3) = 1 ∨ Nat.gcd (2 * j + 1) (2 * j + 3) = 2 by omega) with h | h · exact h · rw [h] at hg1; obtain ⟨c, hc⟩ := hg1; omega refine ⟨2 * j + 1, hsq.of_mul_coprime hcop, by have e : 2 * j + 1 + 1 = 2 * (j + 1) := by ring rw [e]; exact hx, ?_⟩ have := (mul_comm (2 * j + 1) (2 * j + 3)) ▸ hsq exact this.of_mul_coprime hcop.symm /-! ## Kernel-checked finite search -/ /-- trial division: `true` means no divisor `d' ∈ [d, √p]` of `p` (fuel-bounded). -/ def noDivFrom (p : ℕ) : ℕ → ℕ → Bool | _, 0 => false | d, f + 1 => if p < d * d then true else (p % d != 0 && noDivFrom p (d + 1) f) lemma noDivFrom_spec (p : ℕ) : ∀ f d, noDivFrom p d f = true → ∀ k, d ≤ k → k * k ≤ p → ¬ k ∣ p := by intro f induction f with | zero => intro d h; simp [noDivFrom] at h | succ f ih => intro d h k hdk hkk hkd simp only [noDivFrom] at h split_ifs at h with hlt · have : d * d ≤ k * k := Nat.mul_le_mul hdk hdk omega · simp only [Bool.and_eq_true, bne_iff_ne, ne_eq] at h rcases Nat.eq_or_lt_of_le hdk with rfl | hlt' · exact h.1 (Nat.mod_eq_zero_of_dvd hkd) · exact ih (d + 1) h.2 k hlt' hkk hkd def isPrimeB (p : ℕ) : Bool := 2 ≤ p && noDivFrom p 2 p lemma isPrimeB_sound {p : ℕ} (h : isPrimeB p = true) : p.Prime := by simp only [isPrimeB, Bool.and_eq_true, decide_eq_true_eq] at h by_contra hnp have hp1 : p ≠ 1 := by omega have hm := Nat.minFac_prime hp1 have hsq := Nat.minFac_sq_le_self (by omega : 0 < p) hnp exact noDivFrom_spec p p 2 h.2 _ hm.two_le (by rw [← pow_two]; exact hsq) (Nat.minFac_dvd p) /-- search for a prime `q ≥ p` dividing `m` exactly once; returns 0 if none found. -/ def findW (m : ℕ) : ℕ → ℕ → ℕ | 0, _ => 0 | f + 1, p => if m % p == 0 && m % (p * p) != 0 && isPrimeB p then p else findW m f (p + 1) lemma findW_sound (m : ℕ) : ∀ f p, findW m f p ≠ 0 → ¬ Powerful m := by intro f induction f with | zero => intro p h; simp [findW] at h | succ f ih => intro p h simp only [findW] at h split_ifs at h with hc · simp only [Bool.and_eq_true, beq_iff_eq, bne_iff_ne, ne_eq] at hc exact not_powerful_of_witness (isPrimeB_sound hc.2) hc.1.1 hc.1.2 · exact ih _ h def tripleRefuted (n : ℕ) : Bool := findW n (n + 1) 2 != 0 || findW (n + 1) (n + 2) 2 != 0 || findW (n + 2) (n + 3) 2 != 0 lemma tripleRefuted_sound {n : ℕ} (h : tripleRefuted n = true) : ¬ (Powerful n ∧ Powerful (n + 1) ∧ Powerful (n + 2)) := by rintro ⟨h0, h1, h2⟩ simp only [tripleRefuted, Bool.or_eq_true, bne_iff_ne, ne_eq] at h rcases h with (h | h) | h · exact findW_sound _ _ _ h h0 · exact findW_sound _ _ _ h h1 · exact findW_sound _ _ _ h h2 def allRefutedBelow : ℕ → Bool | 0 => true | k + 1 => tripleRefuted k && allRefutedBelow k lemma allRefutedBelow_sound : ∀ N, allRefutedBelow N = true → ∀ n < N, ¬ (Powerful n ∧ Powerful (n + 1) ∧ Powerful (n + 2)) := by intro N induction N with | zero => intro _ n hn; omega | succ N ih => intro h n hn simp only [allRefutedBelow, Bool.and_eq_true] at h rcases Nat.lt_succ_iff_lt_or_eq.1 hn with hlt | rfl · exact ih h.2 n hlt · exact tripleRefuted_sound h.1 /-- **Lemma F (finite search, kernel-checked by `decide`).** No powerful triple starts below `2000`. -/ theorem no_triple_below : ∀ n < 2000, ¬ (Powerful n ∧ Powerful (n + 1) ∧ Powerful (n + 2)) := allRefutedBelow_sound _ (by decide +kernel) /-- Any counterexample to Erdős #364 satisfies all of the above simultaneously. -/ theorem counterexample_constraints {n : ℕ} (h0 : Powerful n) (h1 : Powerful (n + 1)) (h2 : Powerful (n + 2)) : 2000 ≤ n ∧ n % 36 ∈ ({7, 27, 35} : Finset ℕ) ∧ Powerful (n * (n + 2)) := by refine ⟨?_, ?_, h0.mul h2⟩ · by_contra hlt; exact no_triple_below n (by omega) ⟨h0, h1, h2⟩ · have := triple_mod_36 h0 h1 h2; simp only [Finset.mem_insert, Finset.mem_singleton]; omega end Vendored #print axioms Vendored.triple_mod_36 #print axioms Vendored.triple_mod_prime_sq #print axioms Vendored.triple_iff_sq_sub_one #print axioms Vendored.no_triple_below #print axioms Vendored.counterexample_constraints ```