{
 "slug": "erdos307-erdos-307",
 "class": "d",
 "attack": "no",
 "chance_pct": 0,
 "direction": "unknown",
 "statement": "theorem erdos_307 : answer(sorry) ↔ ∃ P Q : Finset ℕ, (∀ p ∈ P, p.Prime) ∧ (∀ q ∈ Q, q.Prime) ∧ 1 = (∑ p ∈ P, (p : ℚ)⁻¹) * (∑ q ∈ Q, (q : ℚ)⁻¹)   -- elaborates to: True ↔ ∃ P Q : Finset ℕ, ...",
 "faithful": true,
 "differences": "Faithful to erdosproblems.com/307 (Barbeau 1976; Ufnarovski-Åhlander 2003 Conjecture 4). Source: FormalConjectures/ErdosProblems/307.lean at commit 7d1a8c99; the pinned audit patch (sha256 352280407f...51275, checked) changes 302.lean and 308.lean but not 307.lean, so the statement is unpatched. Details: (1) P and Q are Finset ℕ, so primes inside each set are automatically distinct. The Lean does not require P and Q to be disjoint, but disjointness follows anyway (see rigidity in the plan). (2) The sums are in ℚ via a Nat→ℚ cast and the inverse. Every element is prime, so 0⁻¹=0 never matters and there is no natural subtraction or division. (3) If P or Q is empty its sum is 0 and the product is 0≠1, so empty sets cannot give a witness. No n=0/n=1 issue arises because 0 and 1 are not prime. (4) answer(sorry) elaborates to True, so the target is `True ↔ ∃ P Q, ...`. A proof needs an explicit witness pair (P,Q). The negation needs a proof that no such pair exists, i.e. the conjecture of Ufnarovski-Åhlander. The weaker 'coprime' variant is a separate constant, already proved for the version that allows 1. The variant with 1 ∉ P∪Q is a separate open constant and is not this target.",
 "solved_in_literature": false,
 "literature": [
  {
   "url": "https://www.erdosproblems.com/307",
   "date": "accessed 2026-11-26",
   "finding": "Problem listed as open. States that P,Q must be disjoint and that sum over P∪Q of 1/p ≥ 2, whence |P∪Q| ≥ 60. No examples are known for the coprime variant with 1 excluded. 0 proof claims, 0 proof expositions."
  },
  {
   "url": "https://www.erdosproblems.com/forum/thread/307",
   "date": "2025-08-09 to 2026-05-30",
   "finding": "6 comments, no solution. Cambie (StijnC): primary pseudoperfect numbers give solutions when 1 is allowed. P determines Q, but checking requires factorising big numbers. An AI-generated nonexistence 'proof' (Nov 2025) was shown wrong: its step 6 assumed that a sum of terms not divisible by q cannot be divisible by q. Commenting has been suspended."
  },
  {
   "url": "https://cs.uwaterloo.ca/journals/JIS/VOL6/Ufnarovski/ufnarovski.tex",
   "date": "2003",
   "finding": "Ufnarovski & Åhlander, 'How to Differentiate a Number', J. Integer Seq. 6, Art. 03.3.4. A period-2 point of the arithmetic derivative n↦n' is equivalent to this equation in distinct primes. They state its non-solvability as a Conjecture (labelled cnj:period2; Bonfioli calls it Conjecture 4). So the problem is open in two literatures."
  },
  {
   "url": "https://github.com/ElVec1o/erdos307",
   "date": "v1.76.2, 2026-10-18",
   "finding": "V. Bonfioli (self-published, AI-assisted, Zenodo DOI 10.5281/zenodo.20684626). States that #307 is OPEN and that 'No proof either way is claimed.' Main results: (a) Rigidity: sum over P of 1/p is automatically in lowest terms, which forces N_P=∏Q, N_Q=∏P and P∩Q=∅ (Lean). (b) Barrier: |P∪Q| ≥ 59 and min(∏P,∏Q) ≥ 2.09e56, Lean-checked without native_decide (theorem erdos307_barrier_closed). (c) A finite check of 49,961 admissible 59-prime supports gives |P∪Q| ≥ 60 (Lean erdos307_sixty claimed). (d) min(∏P,∏Q) > 3.50e57 (paper, not Lean). (e) The problem is everywhere locally soluble, so no congruence obstruction exists. Heuristics cannot be tested below the barrier. The paper notes that the page's '≥60 from sum ≥2' step is incomplete, because the first 59 reciprocals already sum to 2.00235."
  },
  {
   "url": "https://raw.githubusercontent.com/google-deepmind/formal-conjectures/7d1a8c9912747679d0093f6d1216420c33ee5ffa/FormalConjectures/ErdosProblems/307.lean",
   "date": "pinned commit",
   "finding": "Exact target statement. The same file has erdos_307.barrier, tagged 'research solved' and pointing to Bonfioli's Closed.lean: any solution with Q nonempty has 59 ≤ #(P∪Q) and (∏P)^2 ≥ 4·10^112."
  },
  {
   "url": "https://mathoverflow.net/questions/320838/product-of-sum-of-reciprocals-of-prime-numbers",
   "date": "2019-01-14 (question), 2019-08-19 (answer)",
   "finding": "The question is unanswered as a solution. The answer traces the problem to Erdős-Graham (1980) p.38 and to Barbeau, J. Rec. Math. 9 (1976/77) p.30, 'Barbeau notes that this is unknown'. The related semiprime unit-fraction representations of 1 (Barbeau 101 terms, Johnson 48 terms) are a different, solved problem."
  },
  {
   "url": "https://bobrubbens.nl/post/investigating-ep-307-with-genetic-programming/",
   "date": "2025-10-05",
   "finding": "Genetic-programming search over subsets of the first 1000 primes. No exact solution was found; the best |product-1| was about 2.6e-9."
  }
 ],
 "computation": "I ran my own Python script (exact integer/Fraction arithmetic). (1) The sum of 1/p over the first 58 primes is 1.99874004 and over the first 59 primes (p59=277) is 2.00235015. This confirms that the sum-≥2 argument alone gives |P∪Q| ≥ 59, not 60. (2) Exhaustive check over all 262,143 nonempty P ⊆ {primes ≤ 61} (the first 18 primes). I computed X=∏P and Y=X·Σ_P 1/p. gcd(X,Y)=1 held in every case, as rigidity predicts. The necessary condition is that Y=∏Q is squarefree with Y'=X. 55,451 subsets failed because Y is not squarefree. 137,697 subsets had Y fully factored (trial division to 2000 plus a 20-base Miller-Rabin test on the cofactor) and squarefree, and none satisfied Σ_{q|Y} Y/q = X. 68,995 had an unfactored composite cofactor and were not decided by my script. The Lean-checked barrier (∏P ≥ 2·10^56, while ∏(primes ≤61) ≈ 1.2·10^23) excludes them anyway. So no solution exists in this range. This is only a sanity check and carries no evidence beyond the published barrier.",
 "approach_a": "Witness search, aiming at the True side. Look for squarefree pairs (a,b) with disjoint supports and arithmetic derivatives a'=b, b'=a, i.e. Σ_{p|a} a/p = b and Σ_{q|b} b/q = a, with min(a,b) > 3.5e57 and at least 60 primes in total. Search strategy: fix most of P among small primes, compute Y = X·Σ1/p and factor it (ECM/NFS). Accept only if Y is squarefree, coprime to X, and Y' = X. Bonfioli estimates the hit rate as about 1e-112, so this is hopeless in 4 hours. If a witness were ever found, the Lean proof would be: `refine ⟨trivial-side, ⟨P, Q, ?_, ?_, ?_⟩⟩` with explicit Finset literals. Primality of each large q via Mathlib `Nat.Prime` certificates: `lucas_primality` / Pratt-style recursion with `norm_num`/`decide` on ZMod powers (no native_decide allowed). Small primes via `norm_num`. The rational identity via `simp [Finset.sum_insert]` + `norm_num`, or by clearing denominators to a Nat equality and using `decide`/`norm_num`.",
 "approach_b": "Nonexistence, aiming at the ¬ side, i.e. proving ¬(True ↔ ∃ ...). Step 1, rigidity, which is provable and is a compilable partial lemma: with X=∏P and S_P=Σ_{p∈P} X/p, S_P ≡ X/p ≢ 0 (mod p), so gcd(S_P,X)=1. From S_P·S_Q = X·Y it follows that S_P=Y, S_Q=X and P∩Q=∅. Step 2 would need a global obstruction showing that the arithmetic derivative has no 2-cycle on squarefree numbers. None is known. The problem is everywhere locally soluble (Bonfioli), so congruence/sieve arguments cannot work. Size arguments give only the barrier (σ(n·n')<2 Lyapunov), and above mass 2 that criterion is provably false. Analogues exist in some number fields (ℤ[i], ℤ[√2], ...), so a purely algebraic proof cannot exist. Realistically only Step 1 and the barrier can be compiled as partial lemmas.",
 "useful_lemmas": [
  "Finset.prod_dvd_prod_of_subset / Finset.dvd_prod_of_mem (X/p divisibility)",
  "Finset.sum_div, Finset.prod_erase_mul, Finset.mul_prod_erase (writing Σ1/p = S_P/X)",
  "Nat.Coprime.dvd_of_dvd_mul_left / Nat.Coprime.dvd_of_dvd_mul_right (S_P | Y and Y | S_P)",
  "Nat.Prime.dvd_mul, Nat.Prime.dvd_finset_prod_iff / Prime.dvd_finset_prod_iff (p ∤ ∏(P\\{p}))",
  "Finset.dvd_sum and Nat.dvd_sub' (S_P mod p computation)",
  "Nat.dvd_antisymm (S_P = Y)",
  "Rat.num_div_eq_of_coprime / Rat.den_div_eq_of_coprime (Σ1/p in lowest terms)",
  "lucas_primality (Mathlib, for certifying large primes in a witness without native_decide)",
  "Finset.sum_insert, Finset.prod_insert, Finset.sum_singleton (evaluating explicit witnesses)",
  "For a+b ≥ 2 when ab=1 (AM-GM): nlinarith [sq_nonneg (a - b)] over ℚ",
  "Barrier-style bound: an explicit List of the first 58 primes with norm_num primality, then norm_num/decide on the rational sum (< 2)"
 ],
 "plan": "Do not spend a 4-hour Lean attempt on this target. It is class d. The statement is faithful, and its answer is equivalent to the 2003 Ufnarovski-Åhlander conjecture on arithmetic-derivative 2-cycles. It has been open since Barbeau 1976. I found no published solution, and the most thorough recent work (Bonfioli, v1.76.2, Oct 2026) explicitly claims no proof in either direction. A witness, if one exists, would involve at least 60 primes and both products above 3.5·10^57, with an estimated hit rate around 10^-112. Nonexistence has no known local obstruction. A limited, low-value side task is to formalize the rigidity lemma (gcd(S_P,∏P)=1 ⇒ S_P=∏Q, S_Q=∏P, P∩Q=∅) and AM-GM ⇒ Σ_{P∪Q}1/p > 2 as compiled partial lemmas. Neither settles the target, and the barrier is already Lean-formalized upstream.",
 "unverified": [
  "Bonfioli's claims (|P∪Q| ≥ 60 via the 49,961-support check, min(∏P,∏Q) > 3.5e57, the 1e-112 hit-rate estimate, local solvability, number-field analogues) are self-published and not peer-reviewed. I did not rebuild his Lean files.",
  "I did not read Barbeau 1976 (J. Rec. Math. 9) or Erdős-Graham 1980 directly; they are cited via MathOverflow and erdosproblems.com.",
  "Kovič 2012 (J. Integer Seq. 15, Art. 12.3.8) bounds and Bonfioli's erratum on them were not checked.",
  "I did not check the conjectures.io target page for attempts or bounty amount.",
  "The 68,995 subsets in my bounded search with unfactored cofactors were not decided by my script. They are excluded only via the published barrier.",
  "I did not check whether Mathlib at 065356127b1d has an arithmetic-derivative definition or exactly these lemma names.",
  "Web searches (erdosproblems, MathOverflow, arXiv/GitHub via web search 2023-2026) found no solution claim. A search engine can miss a very recent preprint."
 ]
}