{
 "slug": "erdos366-erdos-366",
 "status": "partial",
 "mode": null,
 "challenge_sha256": {
  "formalized/Challenge.lean": "a557578729c6fb4c89155328a4aaf96f30d2ce9e6dc673569c901b77d59cc608",
  "counterexample/Challenge.lean": "106382e5f3ad9cec8d4e623534a77c51295be45d14a4a8701d1f39acf9fd3f55",
  "metadata.json": "31746eb8e497006aea7661a0243ae5d4bc2c14237d63889be315ffa764fe70f3",
  "TaskSupport.lean": "58a80a223dbd7383d92eb2a57b1ec207c0991131a1a1bf24585a4452777c257e (matches metadata task_support_sha256)"
 },
 "class": "d (open problem; only a witness search is available, class-a style; no witness found)",
 "solved": false,
 "summary": "Nothing solved. No witness (2-full n with 3-full n+1) was found. Compiled: the full equivalence between the target and integral points (qBa, qB^3u) on Y^2 = X^3 - q^2 B^3, q = b^4 c^5. Computed: integral points for every normalised pair (q,B) with k = q^2 B^3 <= 563559976 (and every pair with q > 1 up to k <= 149875899392) -- 0 witnesses; a residue-class probe of 61552 further pairs to n+1 < 10^30 -- 0 witnesses.",
 "plan": "Write n = B^3 u^2, n+1 = q a^3 with q = b^4 c^5; each (q,B) is one Mordell curve Y^2 = X^3 - q^2 B^3 with X = qBa, Y = qB^3u. Determine all integral points per curve (Mordell-Weil basis + Sage integral_points), filter by qB | X, qB^3 | Y, Y > 0, then test both Full conditions; a hit would be certified in Lean through target_of_mordell_point. Beyond the feasible curve range, scan a in the residue classes a^3 = 1/q mod B^3.",
 "chance_pct": 0,
 "attempted": [
  {
   "step": "Lean reduction",
   "result": "Lemmas.lean compiles (exit 0) against FC 7d1a8c99 + audit patch, Lean v4.35.0-rc2; 14 lemmas, axioms only propext/Classical.choice/Quot.sound",
   "lemmas": [
    "target_iff_exists",
    "full_two_cube_mul_sq",
    "full_three_of_rep",
    "target_of_rep",
    "mordell_of_rep",
    "rep_of_mordell",
    "target_of_mordell_point",
    "full_of_mul_coprime_left",
    "full_of_mul_coprime_right",
    "two_le_of_full_prime_pow",
    "exists_rep_two",
    "exists_rep_three",
    "target_iff_rep",
    "target_iff_mordell"
   ]
  },
  {
   "step": "Mordell integral points, forward orientation (Y^2 = X^3 - q^2 B^3)",
   "pairs": "q with all prime exponents in {4,5} (or q=1), B squarefree, gcd(q,B)=1",
   "range_all_pairs_attempted": "k <= 10^11 (3602 pairs); additionally q >= 16 up to k <= 197356395591",
   "pairs_k_le_1e11": {
    "total": 3602,
    "settled_integral_points": 2610,
    "settled_congruence_obstruction": 655,
    "unsettled": 337
   },
   "all_records": {
    "total": 3797,
    "settled_integral_points": 2641,
    "settled_congruence_obstruction": 817,
    "unsettled": 339
   },
   "exhaustive": "every pair with k <= 563559976 settled; every pair with q > 1 and k <= 149875899392 settled; nothing beyond these prefixes is exhaustive",
   "integral_points_found_both_signs": 3268,
   "largest_X": "3649843439 (q=1, B=239)",
   "hits": 0,
   "rank_tiers": {
    "A_mwrank_proof_true": 2264,
    "B_pari_ellrank_bounds_equal_plus_saturation": 225,
    "B_ellrank_upper_bound_1_plus_heegner_point": 34,
    "C_analytic_rank_0_numerical": 118
   },
   "ranks": {
    "0": 1457,
    "1": 936,
    "2": 243,
    "3": 5
   },
   "congruence_obstruction_top_moduli": {
    "8": 287,
    "9": 265,
    "7": 127,
    "13": 40,
    "19": 26,
    "5": 21
   },
   "unsettled_q1_B": [
    827,
    907,
    971,
    1019,
    1051,
    1091,
    1123,
    1163,
    1171,
    1173,
    1219,
    1243,
    1257,
    1283,
    1303,
    1317,
    1327,
    1355,
    1362,
    1367,
    1401,
    1411,
    1427,
    1437,
    1439,
    1451,
    1459,
    1461,
    1473,
    1497,
    1499,
    1507,
    1509,
    1523,
    1542,
    1555,
    1569,
    1579,
    1605,
    1614,
    1619,
    1626,
    1627,
    1663,
    1667,
    1689,
    1691,
    1699,
    1723,
    1747,
    1758,
    1761,
    1811,
    1821,
    1831,
    1835,
    1842,
    1857,
    1869,
    1893,
    1905,
    1907,
    1915,
    1929,
    1941,
    1979,
    2003,
    2011,
    2027,
    2051,
    2059,
    2073,
    2083,
    2099,
    2123,
    2131,
    2155,
    2157,
    2179,
    2181,
    2193,
    2195,
    2203,
    2207,
    2217,
    2251,
    2253,
    2265,
    2279,
    2291,
    2298,
    2311,
    2337,
    2339,
    2347,
    2361,
    2363,
    2370,
    2395,
    2409,
    2419,
    2423,
    2433,
    2435,
    2445,
    2447,
    2454,
    2459,
    2469,
    2481,
    2503,
    2514,
    2515,
    2531,
    2539,
    2543,
    2577,
    2579,
    2587,
    2611,
    2613,
    2634,
    2649,
    2659,
    2661,
    2683,
    2706,
    2707,
    2711,
    2731,
    2755,
    2757,
    2766,
    2767,
    2769,
    2803,
    2829,
    2841,
    2843,
    2851,
    2865,
    2877,
    2879,
    2901,
    2903,
    2913,
    2937,
    2939,
    2946,
    2949,
    2958,
    2963,
    2971,
    2973,
    2985,
    2995,
    3011,
    3018,
    3019,
    3021,
    3035,
    3043,
    3054,
    3067,
    3091,
    3093,
    3115,
    3117,
    3119,
    3126,
    3129,
    3131,
    3138,
    3153,
    3163,
    3165,
    3167,
    3187,
    3189,
    3203,
    3210,
    3227,
    3251,
    3261,
    3271,
    3306,
    3307,
    3309,
    3319,
    3323,
    3333,
    3343,
    3345,
    3347,
    3369,
    3378,
    3390,
    3403,
    3405,
    3414,
    3417,
    3426,
    3427,
    3441,
    3453,
    3489,
    3491,
    3499,
    3511,
    3522,
    3523,
    3539,
    3558,
    3561,
    3563,
    3571,
    3585,
    3587,
    3595,
    3602,
    3607,
    3621,
    3623,
    3635,
    3642,
    3643,
    3657,
    3683,
    3691,
    3693,
    3707,
    3714,
    3719,
    3739,
    3765,
    3767,
    3777,
    3779,
    3786,
    3787,
    3791,
    3803,
    3810,
    3813,
    3823,
    3837,
    3846,
    3847,
    3849,
    3851,
    3858,
    3859,
    3873,
    3882,
    3883,
    3899,
    3907,
    3909,
    3921,
    3923,
    3931,
    3935,
    3943,
    3945,
    3947,
    3955,
    3957,
    3979,
    3981,
    4019,
    4029,
    4043,
    4055,
    4062,
    4065,
    4091,
    4099,
    4111,
    4127,
    4139,
    4146,
    4159,
    4163,
    4173,
    4183,
    4187,
    4195,
    4197,
    4209,
    4211,
    4219,
    4233,
    4243,
    4245,
    4267,
    4269,
    4271,
    4281,
    4283,
    4314,
    4315,
    4317,
    4327,
    4341,
    4353,
    4363,
    4377,
    4379,
    4391,
    4398,
    4411,
    4423,
    4427,
    4435,
    4447,
    4449,
    4451,
    4458,
    4461,
    4463,
    4483,
    4497,
    4499,
    4506,
    4530,
    4531,
    4533,
    4547,
    4571,
    4579,
    4593,
    4595,
    4603,
    4619,
    4627,
    4629,
    4639
   ],
   "unsettled_q_gt_1": [
    [
     16,
     839
    ],
    [
     16,
     887
    ]
   ],
   "unsettled_reason": "rank-1 curve whose generator was not found by mwrank/ellrank and ellheegner did not finish (or was not reached) within the 12-75 s per-curve limit"
  },
  {
   "step": "control, reverse orientation (q a^3 + 1 = B^3 u^2, Y^2 = X^3 + k), k <= 2000",
   "result": "10 curves, hits exactly n=8 (q=1,B=1,a=2,u=3) and n=12167 (q=1,B=2,a=23,u=39)"
  },
  {
   "step": "independent rank re-check",
   "result": "2395 curves computed in the first runs compared with PARI ellrank bounds: 2395 consistent, 0 mismatches; 246 later curves (forked processes) not re-checked"
  },
  {
   "step": "residue-class probe beyond the Mordell range (forward)",
   "pairs": 61552,
   "pairs_per_q": {
    "1": 4470,
    "16": 4563,
    "32": 4674,
    "81": 5355,
    "243": 5413,
    "625": 6044,
    "1296": 3634,
    "2401": 6367,
    "2592": 3638,
    "3125": 6066,
    "3888": 3640,
    "7776": 3642,
    "10000": 4046
   },
   "range": "k = q^2 B^3 > 10^11, q <= 10000 (13 values), B <= 12000 squarefree coprime to q; all a = a0 + t*B^3 with a0^3 = 1/q mod B^3 and a < T*B^3, where T = max(500, (floor((10^30/q)^(1/3)) + 2)//B^3 + 1)",
   "residue_classes": 66209,
   "candidates_tested": 34935422,
   "smallest_a_bound": "464159630",
   "hits": 0,
   "exhaustive": "within each listed (q,B): all a below the stated bound, hence all n+1 = q a^3 < 10^30; not exhaustive over (q,B)",
   "control": "sign-flipped run (B <= 6, q = 1) recovers n = 8 and n = 12167"
  }
 ],
 "obstruction": "Open problem; finiteness is known only under abc, so a refutation by computation is impossible and a proof needs an explicit witness. Each (q,B) is a separate Mordell curve; infinitely many remain, the integral-point method stalls on rank-1 curves with large generators (339 unsettled pairs listed), and heuristically few or no witnesses exist. No hit in any settled pair, in the probe, in n < 10^25 (prior report, not replayed) or in the e02 Pell families.",
 "literature": {
  "checked": "2026-11-26",
  "scope": "erdosproblems.com/366 page (statement, remarks, status), OEIS A060355 title, one web search for the 2-full/3-full question with Mordell curves or integral points; no search of MathSciNet/zbMATH; cited papers not read",
  "urls": [
   "https://www.erdosproblems.com/366",
   "https://oeis.org/A060355",
   "https://raw.githubusercontent.com/google-deepmind/formal-conjectures/7d1a8c9912747679d0093f6d1216420c33ee5ffa/FormalConjectures/ErdosProblems/366.lean",
   "https://arxiv.org/abs/2404.03970",
   "https://math.colgate.edu/~integers/z103/z103.pdf",
   "https://arxiv.org/pdf/2605.06697"
  ],
  "findings": "erdosproblems.com/366 (last edited 16 July 2026) still poses the question, lists 0 proof expositions and 1 proof claim, and records only the abc-conditional finiteness remark; no resolution of the exact target was found. The web search returned no source reporting an integral-point search of the curves Y^2 = X^3 - q^2 B^3 for this problem. Search-result summaries (papers NOT read, UNVERIFIED): arXiv 2404.03970 (Walsh) links a different Erdos question on 3-powerful numbers to elliptic curves; an INTEGERS paper (z103) uses Mordell curves for a different family of consecutive powerful numbers; arXiv 2605.06697 concerns three-term progressions of powerful numbers.",
  "solved_in_literature": false
 },
 "chat_log": "missing_original_chat_export",
 "chat_log_note": "No task-provided chat export exists for this item and none was reconstructed. There is no successful proof, so none is required.",
 "unverified": [
  "UNVERIFIED: integral-point completeness rests on SageMath 10.10 E.integral_points, eclib mwrank and PARI 2.17.4 ellrank/ellheegner; it is not formally certified. Cross-checks: brute force X <= 20000 on every curve, PARI rank bounds on 2395 of 2641 curves.",
  "UNVERIFIED: 118 curves are settled through a numerical analytic rank 0 (L(E,1) != 0 not rigorously certified).",
  "UNVERIFIED: the normalisation 'B squarefree, q with exponents in {4,5}, gcd(q,B)=1 covers every witness' is a pen-and-paper argument, not in Lemmas.lean (the Lean lemmas give the existence of some B,u,a,b,c only).",
  "UNVERIFIED: 339 pairs are unsettled (list in attempted[1]); they are not excluded.",
  "UNVERIFIED: prior coverage n < 10^25 and the e02 Pell-family results are taken from the e02-attack input, not replayed.",
  "UNVERIFIED: the papers named in literature.findings were not read.",
  "UNVERIFIED: Lemmas.lean was checked with `lake env lean Lemmas.lean` in the FC checkout under an LD_PRELOAD readlink shim needed only to start Lean in this sandbox; no clean rebuild by a second agent, TaskSupport not compiled, no Main.lean."
 ],
 "input_used": {
  "after-e366_sha256": "8bcea98184ef00b3f4a21c9aa486ab213d51b8ca7a24f0b0235c4768c0f0a080",
  "reused": "target_iff_exists, full_two_cube_mul_sq, full_three_of_rep, target_of_rep (recompiled here)"
 },
 "files": {
  "Lemmas.lean": "import Mathlib\nimport FormalConjectures.ErdosProblems.«366»\n\nnamespace Bounty\n\n/-- The target is equivalent to the existence of a witness. -/\ntheorem target_iff_exists :\n    (type_of% @Erdos366.erdos_366) ↔ ∃ n > 0, Nat.Full 2 n ∧ Nat.Full 3 (n + 1) :=\n  ⟨fun h => h.mp trivial, fun h => ⟨fun _ => h, fun _ => trivial⟩⟩\n\n/-- `B^3 u^2` is always 2-full. -/\ntheorem full_two_cube_mul_sq (B u : ℕ) : Nat.Full 2 (B ^ 3 * u ^ 2) := by\n  intro p hp\n  obtain ⟨pp, hd, _⟩ := Nat.mem_primeFactors.mp hp\n  rcases (Nat.Prime.dvd_mul pp).mp hd with h | h\n  · have h1 : p ∣ B := pp.dvd_of_dvd_pow h\n    exact dvd_mul_of_dvd_left ((pow_dvd_pow p (by norm_num : 2 ≤ 3)).trans (pow_dvd_pow_of_dvd h1 3)) _\n  · have h1 : p ∣ u := pp.dvd_of_dvd_pow h\n    exact dvd_mul_of_dvd_right (pow_dvd_pow_of_dvd h1 2) _\n\n/-- Every number of the form `a^3 b^4 c^5` is 3-full. -/\ntheorem full_three_of_rep (a b c : ℕ) : Nat.Full 3 (a ^ 3 * b ^ 4 * c ^ 5) := by\n  intro p hp\n  obtain ⟨pp, hd, _⟩ := Nat.mem_primeFactors.mp hp\n  rcases (Nat.Prime.dvd_mul pp).mp hd with h | h\n  · rcases (Nat.Prime.dvd_mul pp).mp h with h | h\n    · exact dvd_mul_of_dvd_left (dvd_mul_of_dvd_left (pow_dvd_pow_of_dvd (pp.dvd_of_dvd_pow h) 3) _) _\n    · exact dvd_mul_of_dvd_left (dvd_mul_of_dvd_right ((pow_dvd_pow p (by norm_num : 3 ≤ 4)).trans\n        (pow_dvd_pow_of_dvd (pp.dvd_of_dvd_pow h) 4)) _) _\n  · exact dvd_mul_of_dvd_right ((pow_dvd_pow p (by norm_num : 3 ≤ 5)).trans\n        (pow_dvd_pow_of_dvd (pp.dvd_of_dvd_pow h) 5)) _\n\n/-- Any solution of `B^3 u^2 + 1 = a^3 b^4 c^5` with `0 < B^3 u^2` proves the target. -/\ntheorem target_of_rep {B u a b c : ℕ} (hpos : 0 < B ^ 3 * u ^ 2)\n    (heq : B ^ 3 * u ^ 2 + 1 = a ^ 3 * b ^ 4 * c ^ 5) : type_of% @Erdos366.erdos_366 :=\n  target_iff_exists.mpr ⟨_, hpos, full_two_cube_mul_sq B u, heq ▸ full_three_of_rep a b c⟩\n\n/-- Forward Mordell reduction: `B^3 u^2 + 1 = q a^3` gives the integral point\n`(X, Y) = (q B a, q B^3 u)` on `Y^2 = X^3 - q^2 B^3`. -/\ntheorem mordell_of_rep {B u a q : ℤ} (h : B ^ 3 * u ^ 2 + 1 = q * a ^ 3) :\n    (q * B ^ 3 * u) ^ 2 = (q * B * a) ^ 3 - q ^ 2 * B ^ 3 := by\n  have e : (q * B * a) ^ 3 = q ^ 2 * B ^ 3 * (q * a ^ 3) := by ring\n  rw [e, ← h]; ring\n\n/-- Reverse Mordell reduction: an integral point of `Y^2 = X^3 - q^2 B^3` of the shape\n`(q B a, q B^3 u)` (the reverse divisibility conditions) gives `B^3 u^2 + 1 = q a^3`. -/\ntheorem rep_of_mordell {B u a q : ℤ} (hq : q ≠ 0) (hB : B ≠ 0)\n    (h : (q * B ^ 3 * u) ^ 2 = (q * B * a) ^ 3 - q ^ 2 * B ^ 3) :\n    B ^ 3 * u ^ 2 + 1 = q * a ^ 3 := by\n  have hk : q ^ 2 * B ^ 3 ≠ 0 := mul_ne_zero (pow_ne_zero 2 hq) (pow_ne_zero 3 hB)\n  apply mul_left_cancel₀ hk\n  linear_combination h\n\n/-- A positive integral point `(X, Y)` on `Y^2 = X^3 - q^2 B^3`, `q = b^4 c^5`, with\n`X = q B a` and `Y = q B^3 u`, `u > 0`, proves the target. -/\ntheorem target_of_mordell_point {B u a b c X Y : ℕ} (hB : 0 < B) (hu : 0 < u)\n    (hb : 0 < b) (hc : 0 < c)\n    (hX : X = b ^ 4 * c ^ 5 * B * a) (hY : Y = b ^ 4 * c ^ 5 * B ^ 3 * u)\n    (h : Y ^ 2 + (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 = X ^ 3) : type_of% @Erdos366.erdos_366 := by\n  subst hX hY\n  have hk : 0 < (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 := by positivity\n  refine target_of_rep (B := B) (u := u) (a := a) (b := b) (c := c) (by positivity) ?_\n  apply Nat.eq_of_mul_eq_mul_left hk\n  calc (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 * (B ^ 3 * u ^ 2 + 1)\n      = (b ^ 4 * c ^ 5 * B ^ 3 * u) ^ 2 + (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 := by ring\n    _ = (b ^ 4 * c ^ 5 * B * a) ^ 3 := h\n    _ = (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 * (a ^ 3 * b ^ 4 * c ^ 5) := by ring\n\ntheorem full_of_mul_coprime_left {k a b : ℕ} (hab : Nat.Coprime a b) (hb : b ≠ 0)\n    (h : Nat.Full k (a * b)) : Nat.Full k a := by\n  intro p hp\n  obtain ⟨pp, hd, ha⟩ := Nat.mem_primeFactors.mp hp\n  have h1 : p ^ k ∣ a * b :=\n    h p (Nat.mem_primeFactors.mpr ⟨pp, dvd_mul_of_dvd_left hd b, mul_ne_zero ha hb⟩)\n  have h2 : Nat.Coprime (p ^ k) b := Nat.Coprime.pow_left k (Nat.Coprime.coprime_dvd_left hd hab)\n  exact h2.dvd_of_dvd_mul_right h1\n\ntheorem full_of_mul_coprime_right {k a b : ℕ} (hab : Nat.Coprime a b) (ha : a ≠ 0)\n    (h : Nat.Full k (a * b)) : Nat.Full k b :=\n  full_of_mul_coprime_left hab.symm ha (by rwa [mul_comm] at h)\n\ntheorem two_le_of_full_prime_pow {k p e : ℕ} (hp : p.Prime) (he : 0 < e)\n    (hf : Nat.Full k (p ^ e)) : k ≤ e :=\n  (Nat.pow_dvd_pow_iff_le_right hp.one_lt).mp\n    (hf p (Nat.mem_primeFactors.mpr ⟨hp, dvd_pow_self p he.ne', pow_ne_zero e hp.ne_zero⟩))\n\n/-- Every positive 2-full number is `B^3 u^2`. -/\ntheorem exists_rep_two (n : ℕ) : 0 < n → Nat.Full 2 n → ∃ B u, n = B ^ 3 * u ^ 2 := by\n  induction n using Nat.recOnPosPrimePosCoprime\n  next p e hp he =>\n    intro _ hf\n    have h2 := two_le_of_full_prime_pow hp he hf\n    obtain ⟨m, hm | hm⟩ : ∃ m, e = 2 * m + 2 ∨ e = 2 * m + 3 := ⟨(e - 2) / 2, by omega⟩\n    · exact ⟨1, p ^ (m + 1), by rw [hm]; ring⟩\n    · exact ⟨p, p ^ m, by rw [hm]; ring⟩\n  next => intro h; omega\n  next => intro _ _; exact ⟨1, 1, by norm_num⟩\n  next a b ha hb hab iha ihb =>\n    intro _ hf\n    obtain ⟨B1, u1, h1⟩ := iha (by omega) (full_of_mul_coprime_left hab (by omega) hf)\n    obtain ⟨B2, u2, h2⟩ := ihb (by omega) (full_of_mul_coprime_right hab (by omega) hf)\n    exact ⟨B1 * B2, u1 * u2, by rw [h1, h2]; ring⟩\n\n/-- Every positive 3-full number is `a^3 b^4 c^5`. -/\ntheorem exists_rep_three (n : ℕ) : 0 < n → Nat.Full 3 n → ∃ a b c, n = a ^ 3 * b ^ 4 * c ^ 5 := by\n  induction n using Nat.recOnPosPrimePosCoprime\n  next p e hp he =>\n    intro _ hf\n    have h2 := two_le_of_full_prime_pow hp he hf\n    obtain ⟨m, hm | hm | hm⟩ : ∃ m, e = 3 * m + 3 ∨ e = 3 * m + 4 ∨ e = 3 * m + 5 :=\n      ⟨(e - 3) / 3, by omega⟩\n    · exact ⟨p ^ (m + 1), 1, 1, by rw [hm]; ring⟩\n    · exact ⟨p ^ m, p, 1, by rw [hm]; ring⟩\n    · exact ⟨p ^ m, 1, p, by rw [hm]; ring⟩\n  next => intro h; omega\n  next => intro _ _; exact ⟨1, 1, 1, by norm_num⟩\n  next a b ha hb hab iha ihb =>\n    intro _ hf\n    obtain ⟨a1, b1, c1, h1⟩ := iha (by omega) (full_of_mul_coprime_left hab (by omega) hf)\n    obtain ⟨a2, b2, c2, h2⟩ := ihb (by omega) (full_of_mul_coprime_right hab (by omega) hf)\n    exact ⟨a1 * a2, b1 * b2, c1 * c2, by rw [h1, h2]; ring⟩\n\n/-- The target is equivalent to solvability of `B^3 u^2 + 1 = a^3 b^4 c^5` with `B^3 u^2 > 0`. -/\ntheorem target_iff_rep : (type_of% @Erdos366.erdos_366) ↔\n    ∃ B u a b c : ℕ, 0 < B ^ 3 * u ^ 2 ∧ B ^ 3 * u ^ 2 + 1 = a ^ 3 * b ^ 4 * c ^ 5 := by\n  constructor\n  · intro h\n    obtain ⟨n, hn, h2, h3⟩ := target_iff_exists.mp h\n    obtain ⟨B, u, rfl⟩ := exists_rep_two n hn h2\n    obtain ⟨a, b, c, h⟩ := exists_rep_three _ (Nat.succ_pos _) h3\n    exact ⟨B, u, a, b, c, hn, h⟩\n  · rintro ⟨B, u, a, b, c, hpos, heq⟩\n    exact target_of_rep hpos heq\n\n/-- Complete Mordell reformulation: the target holds iff some curve `Y^2 = X^3 - q^2 B^3`,\n`q = b^4 c^5`, has a point `(q B a, q B^3 u)` with `B, u, b, c > 0`. -/\ntheorem target_iff_mordell : (type_of% @Erdos366.erdos_366) ↔\n    ∃ B u a b c : ℕ, 0 < B ∧ 0 < u ∧ 0 < b ∧ 0 < c ∧\n      (b ^ 4 * c ^ 5 * B ^ 3 * u) ^ 2 + (b ^ 4 * c ^ 5) ^ 2 * B ^ 3\n        = (b ^ 4 * c ^ 5 * B * a) ^ 3 := by\n  constructor\n  · intro h\n    obtain ⟨B, u, a, b, c, hpos, heq⟩ := target_iff_rep.mp h\n    have hB : 0 < B := by\n      rcases Nat.eq_zero_or_pos B with h0 | h0\n      · subst h0; simp at hpos\n      · exact h0\n    have hu : 0 < u := by\n      rcases Nat.eq_zero_or_pos u with h0 | h0\n      · subst h0; simp at hpos\n      · exact h0\n    have hb : 0 < b := by\n      rcases Nat.eq_zero_or_pos b with h0 | h0\n      · subst h0; simp at heq\n      · exact h0\n    have hc : 0 < c := by\n      rcases Nat.eq_zero_or_pos c with h0 | h0\n      · subst h0; simp at heq\n      · exact h0\n    refine ⟨B, u, a, b, c, hB, hu, hb, hc, ?_⟩\n    calc (b ^ 4 * c ^ 5 * B ^ 3 * u) ^ 2 + (b ^ 4 * c ^ 5) ^ 2 * B ^ 3\n        = (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 * (B ^ 3 * u ^ 2 + 1) := by ring\n      _ = (b ^ 4 * c ^ 5) ^ 2 * B ^ 3 * (a ^ 3 * b ^ 4 * c ^ 5) := by rw [heq]\n      _ = (b ^ 4 * c ^ 5 * B * a) ^ 3 := by ring\n  · rintro ⟨B, u, a, b, c, hB, hu, hb, hc, h⟩\n    exact target_of_mordell_point hB hu hb hc rfl rfl h\n\nend Bounty\n\n#print axioms Bounty.target_iff_exists\n#print axioms Bounty.full_two_cube_mul_sq\n#print axioms Bounty.full_three_of_rep\n#print axioms Bounty.target_of_rep\n#print axioms Bounty.mordell_of_rep\n#print axioms Bounty.rep_of_mordell\n#print axioms Bounty.target_of_mordell_point\n#print axioms Bounty.full_of_mul_coprime_left\n#print axioms Bounty.full_of_mul_coprime_right\n#print axioms Bounty.two_le_of_full_prime_pow\n#print axioms Bounty.exists_rep_two\n#print axioms Bounty.exists_rep_three\n#print axioms Bounty.target_iff_rep\n#print axioms Bounty.target_iff_mordell\n",
  "build.log": "# build.log (item e366, batch e03-mordell) -- 2026-11-26, Linux x86_64, 4 cores\n# pins: Lean leanprover/lean4:v4.35.0-rc2 (fc/lean-toolchain); Mathlib via FC lake-manifest (inputRev v4.35.0-rc2, pin 065356127b1d per catalog metadata);\n#       FC base 7d1a8c9912747679d0093f6d1216420c33ee5ffa + audit patch sha256 352280407fbbe83e636aa07a5c090aab15c6353c7cd77c0491284cd40df51275 (= FC 6adcbe13652f per inventory)\n$ curl -sL -o elan.tgz https://github.com/leanprover/elan/releases/download/v4.2.3/elan-x86_64-unknown-linux-gnu.tar.gz && ./elan-init -y --default-toolchain none --no-modify-path   # ELAN_HOME inside workspace\n# sandbox workaround only: LD_PRELOAD shim mapping readlink('/proc/<pid>/exe') to '/proc/self/exe' (Lean cannot locate itself in the PID-namespaced sandbox otherwise)\n$ git init -q fc && cd fc && git fetch -q --depth 1 https://github.com/google-deepmind/formal-conjectures 7d1a8c9912747679d0093f6d1216420c33ee5ffa && git checkout -q FETCH_HEAD   # exit 0\n$ curl -sL -o ../audit.patch https://raw.githubusercontent.com/conjectures-io/conjectures-tasks/f5dab9b843c460bf946e0ec7b0e6ad2f2f739eb8/tiers/tier-1/formal-conjectures-audit-fixes.patch && sha256sum ../audit.patch\n352280407fbbe83e636aa07a5c090aab15c6353c7cd77c0491284cd40df51275  ../audit.patch     # matches inventory.pins.formal_conjectures.patch_sha256\n$ git apply ../audit.patch   # exit 0\n$ lake exe cache get   # exit 0\nDecompressed 8915 file(s)\n$ lake build 'FormalConjectures.ErdosProblems.«366»'\n✔ [9197/9198] Built FormalConjecturesUtil (3.1s)\n✔ [9198/9198] Built FormalConjectures.ErdosProblems.«366» (22s)\nBuild completed successfully (9198 jobs).\n\nreal\t1m59.157s\nuser\t4m26.464s\nsys\t1m19.113s\nbuild_exit=0\n$ sha256sum TaskSupport.lean   # from conjectures-io/conjectures-validator@57c969e87cad845b60908cef474c8d1c0b6e43c5/lean/TaskSupport.lean\n58a80a223dbd7383d92eb2a57b1ec207c0991131a1a1bf24585a4452777c257e   # equals metadata task_support_sha256; TaskSupport was NOT compiled (no Main.lean: no full proof)\n$ lake env lean Lemmas.lean     # run at the FC root; Lemmas.lean sha256 bc3da3b9355633549578372fb09de053ef2a5e64361aa312cf4a6219acca34c1\nLemmas.lean:4:0: warning: This file has no module docstring (`/-! ... -/`). Add one after the imports to document the file.\n\nNote: This linter can be disabled with `set_option linter.style.moduleDocstring false`\n'Bounty.target_iff_exists' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_two_cube_mul_sq' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_three_of_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_of_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.mordell_of_rep' depends on axioms: [propext]\n'Bounty.rep_of_mordell' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_of_mordell_point' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_of_mul_coprime_left' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_of_mul_coprime_right' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.two_le_of_full_prime_pow' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.exists_rep_two' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.exists_rep_three' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_iff_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_iff_mordell' depends on axioms: [propext, Classical.choice, Quot.sound]\n\nreal\t0m5.562s\nuser\t0m4.225s\nsys\t0m2.158s\nlemmas_exit=0\n# No Main.lean was produced, so `lake build Main` / Bounty.target were not run.\n",
  "axioms.txt": "'Bounty.target_iff_exists' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_two_cube_mul_sq' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_three_of_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_of_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.mordell_of_rep' depends on axioms: [propext]\n'Bounty.rep_of_mordell' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_of_mordell_point' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_of_mul_coprime_left' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.full_of_mul_coprime_right' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.two_le_of_full_prime_pow' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.exists_rep_two' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.exists_rep_three' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_iff_rep' depends on axioms: [propext, Classical.choice, Quot.sound]\n'Bounty.target_iff_mordell' depends on axioms: [propext, Classical.choice, Quot.sound]\n",
  "explanation.md": "# erdos366-erdos-366 -- Mordell-curve attack (item e366, batch e03-mordell)\n\n**Result: no witness found; the target is NOT solved.** Status `partial`: compiled reduction lemmas plus negative search results.\n\n## Target\n`Erdos366.erdos_366 : True <-> exists n > 0, Nat.Full 2 n /\\ Nat.Full 3 (n + 1)` (the `answer(sorry)` slot elaborates to `True` in the catalog's formalized mode; the counterexample mode is its negation). One positive witness would prove it; a refutation needs a proof that none exists.\n\n## Reduction (all Lean-checked, see Lemmas.lean)\n* Every positive 2-full n is `B^3 u^2` (`exists_rep_two`) and every positive 3-full number is `a^3 b^4 c^5` (`exists_rep_three`), by induction over prime powers / coprime products. Hence the target is equivalent to solvability of `B^3 u^2 + 1 = a^3 b^4 c^5` with `B^3 u^2 > 0` (`target_iff_rep`).\n* With `q = b^4 c^5`: `B^3 u^2 + 1 = q a^3` implies `(q B^3 u)^2 = (q B a)^3 - q^2 B^3` (`mordell_of_rep`), i.e. `(X, Y) = (qBa, qB^3u)` is an integral point of the Mordell curve `Y^2 = X^3 - k`, `k = q^2 B^3`. Conversely a point of that shape (reverse divisibility `qB | X`, `qB^3 | Y`) gives back the equation (`rep_of_mordell`), and with `B, u, b, c > 0` it proves the target (`target_of_mordell_point`). `target_iff_mordell` states the full equivalence. Both Full tests are automatic for such a point (`full_two_cube_mul_sq`, `full_three_of_rep`); the scripts re-test them by factoring anyway.\n* Without loss of generality B is squarefree and q has all prime exponents in {4,5} with gcd(q,B)=1 (pen-and-paper normalisation, NOT formalised: UNVERIFIED in Lean). Each pair (q,B) is one curve with finitely many integral points (Siegel), so a pair is settled for ALL n once its integral points are known.\n\n## Search 1: integral points (SageMath 10.10 / eclib mwrank / PARI 2.17.4) -- unbounded in n per settled pair\nFor each normalised pair, first a congruence test (is `B^3u^2+1 = q a^3` solvable mod m for m in 7,9,13,19,8,5,16,27,31,37,43,49,61,67,73,25,11 and mod p or p^2 for p | qB); otherwise Mordell-Weil generators and `E.integral_points(both_signs=True)`, then the filter `qB | X`, `qB^3 | Y`, `Y > 0`.\n* All 3602 pairs with k <= 10^11 were attempted: 2610 settled by integral points, 655 settled by a congruence obstruction, 337 unsettled (rank-1 curves whose generator was not found in time, or timeouts). Including pairs with q >= 16 up to k <= 197356395591: 2641 settled by integral points, 817 by congruence, 339 unsettled.\n* **Exhaustive statements:** every pair with k <= 563559976 is settled (first unsettled: q=1, B=827); every pair with q > 1 and k <= 149875899392 is settled (first unsettled: q=16, B=839).\n* 3268 integral points (both signs) were found in total; **none satisfies the reverse divisibility, so there are 0 witnesses** in any settled pair.\n* Rank certification tiers of the 2641 curves: 2264 mwrank with proof=True; 225 PARI ellrank (lower = upper bound, points saturated by Sage); 34 PARI ellrank upper bound 1 + Heegner point (ellheegner) + saturation; 118 analytic rank 0 (numerical L(E,1) != 0, then Coates-Wiles) -- this last tier is numerical, not certified.\n* Controls: the same code with the sign flipped (`q a^3 + 1 = B^3 u^2`, curve `Y^2 = X^3 + k`) recovers exactly n = 8 (q=1,B=1) and n = 12167 (q=1,B=2) for k <= 2000. Every curve is cross-checked by brute force for X <= 20000.\n* Reliability incident: in one run a worker that had been interrupted by a timeout later returned rank 0 for (q,B) = (81,290), whose curve has the point (5481, 68121); the brute-force cross-check caught it. All results of that run were discarded and recomputed in forked processes (one process per curve); the 2395 curves computed before were re-checked against independent PARI ellrank bounds (2395/2395 consistent). The 246 curves computed afterwards in forked processes did not get that second check.\n\n## Search 2: residue-class probe beyond the Mordell range\nFor 61552 pairs with k > 10^11, q in {1,16,32,81,243,625,1296,2401,2592,3125,3888,7776,10000}, B <= 12000 squarefree coprime to q: all cube roots a0 of 1/q mod B^3 (66209 classes), every a = a0 + t B^3 with a < T B^3, T = max(500, (floor((10^30/q)^(1/3)) + 2)//B^3 + 1) (so at least a < 464159630), tested whether (q a^3 - 1)/B^3 is a perfect square. 34935422 candidates, **0 hits**. So in these (q,B) classes there is no witness with n + 1 < 10^30 (and none up to n ~ 10^41 for q=1), beyond the reported n < 10^25. The sign-flipped control recovers 8 and 12167.\n\n## Where it is stuck\nThe problem is open (erdosproblems.com/366, last edited 16 July 2026); only conditional (abc) finiteness is known, so no finite computation refutes the statement and a proof needs a witness. Integral-point computations settle one (q,B) at a time; infinitely many pairs remain, and a heuristic count predicts few or no witnesses. Unsettled pairs are listed in result.json. Chance of settling the target this way: about 0%.\n",
  "mw2.sage": "import sys, time, json, os\nfrom cysignals.alarm import alarm, cancel_alarm, AlarmInterrupt\nr=int(sys.argv[1]); NW=int(sys.argv[2]); KMAX=Integer(sys.argv[3]); TMO=int(sys.argv[4]); WALL=float(sys.argv[5]); SIGN=int(sys.argv[6]); OUT=sys.argv[7]\nT0=time.time()\ndef qlist(lim):\n    # q with all prime exponents in {4,5} (q=b^4c^5, b,c squarefree coprime), q<=lim\n    res=[1]\n    for p in primes(2, int(lim**0.25)+2):\n        new=[]\n        for x in res:\n            if x%p==0: continue\n            for e in (4,5):\n                if x*p**e<=lim: new.append(x*p**e)\n        res+=new\n    return sorted(res)\ndef local_obstruction(q,B):\n    # is B^3 u^2 + s = q a^3 unsolvable mod m ?  (s=+1 forward: B^3u^2+1=qa^3 ; SIGN=-1 => curve Y^2=X^3-k)\n    s = 1 if SIGN==-1 else -1\n    for m in [7,9,13,19,8,5,16,27,31,37,43,49,61,67,73,25,11]:\n        us=set((B**3*u*u+s)%m for u in range(m)); as_=set((q*a**3)%m for a in range(m))\n        if not (us & as_): return m\n    for p in prime_divisors(q*B):\n        if p>5000: continue\n        m=p**2 if p<70 else p\n        us=set((B**3*u*u+s)%m for u in range(m)); as_=set((q*a**3)%m for a in range(m))\n        if not (us & as_): return m\n    return 0\ndef full(k,n):\n    return all(e>=k for _,e in factor(n))\ntasks=[]\nfor q in qlist(isqrt(KMAX)):\n    B=1\n    while q*q*B**3<=KMAX:\n        if is_squarefree(B) and gcd(B,q)==1: tasks.append((q*q*B**3,q,B))\n        B+=1\nMINQ=int(os.environ.get('MINQ','1')); tasks=[t for t in tasks if t[1]>=MINQ]\ntasks.sort()\ndone=set()\nif os.environ.get('PREV'):\n    for d in json.load(open(os.environ['PREV'])): done.add((d['q'],d['B']))\nif os.path.exists(OUT):\n    for l in open(OUT):\n        d=json.loads(l); done.add((d['q'],d['B']))\nfrom sage.parallel.decorate import fork\n@fork(timeout=TMO, verbose=False)\ndef work(k,q,B):\n    rec={}\n    t=time.time()\n    E=EllipticCurve([0,0,0,0,SIGN*k])\n    tier='A_mwrank'\n    try:\n        g=E.gens(proof=True)\n    except RuntimeError:\n        er=E.pari_curve().ellrank()\n        lo,hi=int(er[0]),int(er[1]); pp=[E([QQ(p[0]),QQ(p[1])]) for p in er[3]]\n        if lo==hi and len(pp)==lo:\n            tier='B_pari_ellrank'\n        elif hi==1 and len(pp)==0:\n            P=E.pari_curve().ellheegner()\n            pp=[E([QQ(P[0]),QQ(P[1])])]\n            if pp[0].order()!=oo: raise RuntimeError('heegner torsion')\n            tier='B_ellrank_upper1_heegner'\n        else:\n            ra=int(E.analytic_rank())\n            if ra==0: pp=[]; tier='C_analytic_rank0'\n            elif ra==1 and len(pp)==1: tier='C_analytic_rank1'\n            else: raise RuntimeError('undetermined ellrank=%s..%s npts=%s an=%s'%(lo,hi,len(pp),ra))\n        g=E.saturation(pp)[0] if pp else []\n    P=E.integral_points(mw_base=g,both_signs=True)\n    pts=[(Integer(p[0]),Integer(p[1])) for p in P]\n    # brute-force cross-check for small X\n    lo = 1 if SIGN==-1 else -int(RR(k).nth_root(3))-2\n    bf=set()\n    for X in range(lo,20001):\n        v=X**3+SIGN*k\n        if v>=0 and is_square(v): bf.add(Integer(X))\n    miss=sorted(bf-set(p[0] for p in pts))\n    hits=[]\n    for X,Y in pts:\n        if Y>0 and X>0 and X%(q*B)==0 and Y%(q*B**3)==0:\n            a=X//(q*B); u=Y//(q*B**3)\n            if SIGN==-1:\n                n=B**3*u*u; ok=(n+1==q*a**3) and full(2,n) and full(3,n+1)\n            else:\n                n=q*a**3; ok=(n+1==B**3*u*u) and full(3,n) and full(2,n+1)\n            hits.append({'a':str(a),'u':str(u),'n':str(n),'ok':bool(ok)})\n    rec.update(status='done',tier=tier,rank=len(g),npts=len(pts),maxX=str(max([p[0] for p in pts],default=0)),hits=hits,bf_missing=[str(x) for x in miss],secs=float(round(time.time()-t,2)))\n    return rec\nf=open(OUT,'a')\nfor i,(k,q,B) in enumerate(tasks):\n    if i%NW!=r or (int(q),int(B)) in done: continue\n    if time.time()-T0>WALL: break\n    rec={'q':int(q),'B':int(B),'k':str(k),'sign':SIGN}\n    m=local_obstruction(q,B)\n    if m: rec.update(status='local_obstruction',mod=int(m))\n    else:\n        t=time.time()\n        res=work(k,q,B)\n        if isinstance(res,dict) and res.get('status')=='done': rec.update(res)\n        elif isinstance(res,str) and 'timed out' in res: rec.update(status='timeout')\n        else: rec.update(status='unproven',err=str(res)[:200])\n    f.write(json.dumps(rec)+'\\n'); f.flush()\n",
  "probe.sage": "import sys, json, time\nSIGN=int(sys.argv[1]); KLO=Integer(sys.argv[2]); BMAX=int(sys.argv[3]); QMAX=int(sys.argv[4]); TMIN=int(sys.argv[5]); NLIM=Integer(sys.argv[6]); OUT=sys.argv[7]\n# forward (SIGN=-1): B^3 u^2 + 1 = q a^3  -> a^3 = 1/q mod B^3 ; control (SIGN=1): q a^3 + 1 = B^3 u^2 -> a^3 = -1/q mod B^3\ndef qlist(lim):\n    res=[1]\n    for p in primes(2, int(lim**0.25)+2):\n        new=[]\n        for x in res:\n            if x%p==0: continue\n            for e in (4,5):\n                if x*p**e<=lim: new.append(x*p**e)\n        res+=new\n    return sorted(res)\ndef full(k,n): return all(e>=k for _,e in factor(n))\nt0=time.time(); npairs=0; nchecks=0; hits=[]; nroots=0; minA=None; per_q={}\nfor q in qlist(QMAX):\n    A=Integer(floor((RR(NLIM)/q)**(1/3)))+2\n    cnt=0\n    for B in range(1,BMAX+1):\n        if q*q*B**3<=KLO or gcd(B,q)!=1 or not is_squarefree(B): continue\n        M=Integer(B)**3; npairs+=1; cnt+=1\n        c = (1 if SIGN==-1 else -1)\n        if M==1: roots=[0]\n        else:\n            try: roots=[Integer(x) for x in (Mod(c,M)/Mod(q,M)).nth_root(3,all=True)]\n            except ValueError: roots=[]\n        nroots+=len(roots)\n        T=max(TMIN, A//M+1)\n        lim=T*M; minA = lim if minA is None else min(minA,lim)\n        for a0 in roots:\n            a=a0\n            if a==0: a=M\n            for t in range(T):\n                v=q*a**3-c\n                m=v//M\n                nchecks+=1\n                if m>0 and is_square(m):\n                    u=isqrt(m)\n                    if SIGN==-1: n=M*u*u; ok=(n+1==q*a**3) and full(2,n) and full(3,n+1)\n                    else: n=q*a**3; ok=(n+1==M*u*u) and full(3,n) and full(2,n+1)\n                    hits.append({'q':int(q),'B':int(B),'a':str(a),'u':str(u),'n':str(n),'ok':bool(ok)})\n                a+=M\n    per_q[int(q)]=int(cnt)\njson.dump({'sign':SIGN,'k_lower_excl':str(KLO),'Bmax':int(BMAX),'qmax':int(QMAX),'Tmin':int(TMIN),'nlim':str(NLIM),'pairs':int(npairs),'residue_classes':int(nroots),'checks':int(nchecks),'hits':hits,'min_a_bound':str(minA),'pairs_per_q':per_q,'secs':float(time.time()-t0)},open(OUT,'w'))\n"
 },
 "files_note": "mw2.sage args: worker NW KMAX timeout_s wall_s SIGN out (env MINQ, PREV); probe.sage args: SIGN KLO BMAX QMAX TMIN NLIM out. Per-curve result records are not included (size)."
}