{
 "slug": "erdos366-erdos-366",
 "mode": "implement (continuation of e02-attack e366)",
 "challenge_sha256": "UNVERIFIED: Challenge.lean was not fetched or hashed in this run",
 "class": "a (no finite computation can refute; only a witness settles it)",
 "chance_pct": 0,
 "status": "none",
 "plan": "Regenerate the 59 undecided forward Pell cases (n=B^3u^2, n+1=D^3v^2, X=D^2v, Y=Bu, X^2-BD*Y^2=D, coprime squarefree B,D<=300, X<10^300), factor the cofactors of v, and for each find a proved prime p not dividing D with p||v. Then n+1 has exponent 2 at p, so it is not 3-full.",
 "result": "All 59 undecided cases are excluded: each has a prime p (certified with flint fmpz.is_prime), p does not divide D, p | v and p^2 does not divide v. No witness exists in any family B,D<=300 with X<10^300. This is a negative search result, not a proof or refutation of the Lean statement.",
 "attempted": {
  "regeneration": "gen.py (below; derived from the e02 script, which was reconstructed from the input JSON) with K=300, LIM=10^300 gave 59 undecided and 0 hits; this matches e02. It also covers B=1 (D>=2) and B>=2 with D>=1. sympy 1.14.0 diop_DN.",
  "factoring": "Trial division by primes <20000 (in gen.py), then sympy ecm for 21 cases, then python-flint 0.9.0 fmpz.factor_smooth(bits 30..80) for 36 more. Case (B=7,D=134,n 304 digits) was split by ECM at bits 80 and found p=10271005603269118321391. Case (B=7,D=1,n 539 digits, v=x_224 of x^2-7y^2=1) had a 270-digit composite cofactor, which ECM could not split below 2^80 (aborted at 100 bits). It was handled algebraically: v=x_224 is divisible by x_32=T_32(8) (39 digits, proved prime), and the rest of v is coprime to it, so p=x_32 has exponent 1.",
  "final_check": "final.py re-verified for every one of the 59 rows: D%p!=0, v%p==0, v%p^2!=0, p prime (proved). unexcluded=0."
 },
 "exclusion_table_59": [
  {
   "B": 1,
   "D": 17,
   "n_digits": 216,
   "p": "263090369",
   "p_digits": 9
  },
  {
   "B": 1,
   "D": 17,
   "n_digits": 402,
   "p": "79153",
   "p_digits": 5
  },
  {
   "B": 1,
   "D": 37,
   "n_digits": 80,
   "p": "17959167392090879211787066577",
   "p_digits": 29
  },
  {
   "B": 1,
   "D": 37,
   "n_digits": 400,
   "p": "21169",
   "p_digits": 5
  },
  {
   "B": 1,
   "D": 73,
   "n_digits": 486,
   "p": "2385593237953",
   "p_digits": 13
  },
  {
   "B": 1,
   "D": 101,
   "n_digits": 263,
   "p": "61976420729",
   "p_digits": 11
  },
  {
   "B": 1,
   "D": 145,
   "n_digits": 400,
   "p": "66701",
   "p_digits": 5
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 52,
   "p": "25841",
   "p_digits": 5
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 61,
   "p": "3145168096064063804528641",
   "p_digits": 25
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 135,
   "p": "34145463617",
   "p_digits": 11
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 159,
   "p": "6227521",
   "p_digits": 7
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 196,
   "p": "7460967982148609",
   "p_digits": 16
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 208,
   "p": "665857",
   "p_digits": 6
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 233,
   "p": "665857",
   "p_digits": 6
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 282,
   "p": "665857",
   "p_digits": 6
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 306,
   "p": "54401",
   "p_digits": 5
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 355,
   "p": "665857",
   "p_digits": 6
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 364,
   "p": "25841",
   "p_digits": 5
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 380,
   "p": "5399194368759727756806579153847246009349861587446399125956651636715469894363109037351739229068553380210239892767476777056729848830886021775315758258389755460164740428641530416620748801",
   "p_digits": 184
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 392,
   "p": "79873",
   "p_digits": 5
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 453,
   "p": "5813441",
   "p_digits": 7
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 576,
   "p": "150401",
   "p_digits": 6
  },
  {
   "B": 2,
   "D": 1,
   "n_digits": 588,
   "p": "161418241",
   "p_digits": 9
  },
  {
   "B": 2,
   "D": 73,
   "n_digits": 180,
   "p": "47878073",
   "p_digits": 8
  },
  {
   "B": 2,
   "D": 177,
   "n_digits": 337,
   "p": "31800193067737",
   "p_digits": 14
  },
  {
   "B": 3,
   "D": 1,
   "n_digits": 220,
   "p": "310273",
   "p_digits": 6
  },
  {
   "B": 3,
   "D": 13,
   "n_digits": 66,
   "p": "30577",
   "p_digits": 5
  },
  {
   "B": 6,
   "D": 1,
   "n_digits": 95,
   "p": "80789839489",
   "p_digits": 11
  },
  {
   "B": 6,
   "D": 1,
   "n_digits": 287,
   "p": "52609",
   "p_digits": 5
  },
  {
   "B": 7,
   "D": 1,
   "n_digits": 539,
   "p": "150038171394905030432003281854339710977",
   "p_digits": 39
  },
  {
   "B": 7,
   "D": 2,
   "n_digits": 320,
   "p": "26041",
   "p_digits": 5
  },
  {
   "B": 7,
   "D": 2,
   "n_digits": 444,
   "p": "26041",
   "p_digits": 5
  },
  {
   "B": 7,
   "D": 22,
   "n_digits": 227,
   "p": "290767",
   "p_digits": 6
  },
  {
   "B": 7,
   "D": 86,
   "n_digits": 135,
   "p": "27989903",
   "p_digits": 8
  },
  {
   "B": 7,
   "D": 134,
   "n_digits": 304,
   "p": "10271005603269118321391",
   "p_digits": 23
  },
  {
   "B": 10,
   "D": 1,
   "n_digits": 63,
   "p": "1039681",
   "p_digits": 7
  },
  {
   "B": 10,
   "D": 1,
   "n_digits": 316,
   "p": "1039681",
   "p_digits": 7
  },
  {
   "B": 10,
   "D": 1,
   "n_digits": 442,
   "p": "26881",
   "p_digits": 5
  },
  {
   "B": 11,
   "D": 1,
   "n_digits": 114,
   "p": "79201",
   "p_digits": 5
  },
  {
   "B": 14,
   "D": 1,
   "n_digits": 165,
   "p": "9439950913",
   "p_digits": 10
  },
  {
   "B": 15,
   "D": 1,
   "n_digits": 215,
   "p": "68161",
   "p_digits": 5
  },
  {
   "B": 15,
   "D": 1,
   "n_digits": 430,
   "p": "63361",
   "p_digits": 5
  },
  {
   "B": 26,
   "D": 1,
   "n_digits": 209,
   "p": "54100801",
   "p_digits": 8
  },
  {
   "B": 31,
   "D": 1,
   "n_digits": 432,
   "p": "4620799",
   "p_digits": 7
  },
  {
   "B": 31,
   "D": 2,
   "n_digits": 65,
   "p": "36457",
   "p_digits": 5
  },
  {
   "B": 31,
   "D": 5,
   "n_digits": 84,
   "p": "3240904363",
   "p_digits": 10
  },
  {
   "B": 46,
   "D": 1,
   "n_digits": 75,
   "p": "167216452795056449",
   "p_digits": 18
  },
  {
   "B": 46,
   "D": 1,
   "n_digits": 225,
   "p": "2184620927",
   "p_digits": 10
  },
  {
   "B": 46,
   "D": 1,
   "n_digits": 600,
   "p": "656451176449",
   "p_digits": 12
  },
  {
   "B": 58,
   "D": 1,
   "n_digits": 533,
   "p": "768555217",
   "p_digits": 9
  },
  {
   "B": 61,
   "D": 13,
   "n_digits": 240,
   "p": "111383956201667057",
   "p_digits": 18
  },
  {
   "B": 70,
   "D": 1,
   "n_digits": 76,
   "p": "441104672045018787521151743",
   "p_digits": 27
  },
  {
   "B": 70,
   "D": 1,
   "n_digits": 529,
   "p": "126001",
   "p_digits": 6
  },
  {
   "B": 78,
   "D": 1,
   "n_digits": 211,
   "p": "68582383",
   "p_digits": 8
  },
  {
   "B": 78,
   "D": 1,
   "n_digits": 421,
   "p": "196993",
   "p_digits": 6
  },
  {
   "B": 127,
   "D": 2,
   "n_digits": 344,
   "p": "516124317001",
   "p_digits": 12
  },
  {
   "B": 155,
   "D": 1,
   "n_digits": 334,
   "p": "124001",
   "p_digits": 6
  },
  {
   "B": 238,
   "D": 1,
   "n_digits": 297,
   "p": "272051137",
   "p_digits": 9
  },
  {
   "B": 266,
   "D": 1,
   "n_digits": 477,
   "p": "26497",
   "p_digits": 5
  }
 ],
 "obstruction": "The problem is open. A proof needs a witness (none below 10^22 or 10^25 per the cited pages, none in the Pell families searched). Refutation would need abc-type input; only a conditional claim exists.",
 "lean": "NOT rebuilt in this run (no Lean/elan/Mathlib on this machine, no time to set up). The seven lemmas from e02 (target_iff_exists, full_iff_of_ne_zero, not_full_of_prime, full_two_cube_mul_sq, full_three_of_rep, target_of_rep, no_witness_le_300) are UNVERIFIED here. No Main.lean, Lemmas.lean, build.log or axioms.txt delivered. The Lean target and TaskSupport digest were not checked.",
 "literature": {
  "urls": [
   "https://primereboot.pages.dev/erdos/problem/366",
   "https://arxiv.org/abs/2605.06697"
  ],
  "scope": "Checked 2026-11-26. The primereboot mirror of the problem lists it OPEN, with only the reverse-orientation examples (8,9) and (12167,12168) and no other examples below 10^22. arXiv 2605.06697 (van Doorn, 4 May 2026) is about three-term APs of powerful numbers and does not mention #366 (UNVERIFIED beyond the abstract). erdosproblems.com/366 returned HTTP 403, so it was not re-read; the e02 report of its content (last edited 16 July 2026) is carried over UNVERIFIED. No complete prior solution found. No dated formal proof search beyond that."
 },
 "chat_log": "missing_original_chat_export",
 "unverified": [
  "completeness of sympy diop_DN solution sets",
  "Lean lemmas not rebuilt",
  "Challenge.lean and metadata digest not checked",
  "erdosproblems.com page not re-read (403)",
  "prior bounds 10^22/10^25 taken from third-party pages"
 ],
 "gen_py": "import sys, math, json\nsys.path.insert(0,sys.argv[3])\nfrom multiprocessing import get_context\nfrom sympy.solvers.diophantine.diophantine import diop_DN\nfrom sympy import primerange, isprime, perfect_power\nLIM=10**int(sys.argv[2]); K=int(sys.argv[1])\nSMALLP=list(primerange(2,20000))\ndef sqfree(n):\n    for p in SMALLP:\n        if p*p>n: break\n        if n%(p*p)==0: return False\n    return True\ndef ok3(v,D):\n    r=v; small={}\n    for p in SMALLP:\n        if r%p==0:\n            e=0\n            while r%p==0: r//=p; e+=1\n            small[p]=e\n            if e==1 and D%p!=0: return False,None\n    if r==1: return True,None\n    if isprime(r) and D%r!=0: return False,None\n    if r<20000**4 and not perfect_power(r) and D%r!=0: return False,None\n    return None,r\ndef family(a):\n    B,D=a; N=B*D; fund=diop_DN(N,1); x1,y1=fund[0]; out=[]; seen=set()\n    for (x0,y0) in diop_DN(N,D):\n        for s in (1,-1):\n            X,Y=x0,s*y0\n            while abs(X)<LIM:\n                aX,aY=abs(X),abs(Y)\n                if (aX,aY) not in seen and aY>0:\n                    seen.add((aX,aY))\n                    if aX%(D*D)==0 and aY%B==0:\n                        v=aX//(D*D);u=aY//B;n=B**3*u*u\n                        if n>0:\n                            o,r=ok3(v,D)\n                            if o is not False: out.append((o,B,D,n,v,r))\n                X,Y=X*x1+N*Y*y1,X*y1+Y*x1\n    return out\nif __name__=='__main__':\n    pairs=[(B,D) for B in range(2,K+1) for D in range(1,K+1) if B*D>1 and math.gcd(B,D)==1 and sqfree(B) and sqfree(D)]\n    # include B=1? task says start B=2,D=1; B=1 also covered by prior script\n    pairs=[(1,D) for D in range(2,K+1) if sqfree(D)]+pairs\n    res=[]\n    with get_context('fork').Pool(8) as pool:\n        for o in pool.imap_unordered(family,pairs,chunksize=4): res+=o\n    json.dump([[x if not isinstance(x,int) else str(x) for x in t] for t in res],open('und.json','w'))\n    print(len(res), sum(1 for t in res if t[0] is True), sum(1 for t in res if t[0] is None))\n"
}