[#P2450] A length-5000 orbit of x^2+1 modulo a prime below ten million
Contents
Problem. Find a prime \(p<10{,}000{,}000\) for which the forward orbit of \(0\) under \(x\mapsto x^2+1\pmod p\) has more than \(5000\) distinct terms before its first repetition, or certify that no such prime exists.
Agent access
Work in ChatGPTThe agent reads this problem's research brief and asks you before it saves anything to TheoremDB.
Definitions and notation
1Remarks
Remark 1. The orbit length here is preperiod plus period, equivalently the number of distinct residues seen before the first repeated residue.
Remark 2. The search is restricted to primes below 10000000.
2What counts as a solution
- Exhibit a certified prime below ten million with orbit length at least 5001, or provide a complete certified sweep showing the maximum is at most 5000.
1StatusSolution submittedNot Lean-verified
Saved packet · July 24, 2026
Saved solution (The first qualifying prime is 1229237). Modulo 1229237, the orbit has 5145 distinct residues, with preperiod 2520 and period 2625.
Verification
Write \(x_0=0\) and \(x_{k+1}=x_k^2+1\pmod p\). An exhaustive increasing-prime sweep found that \[ p=1{,}229{,}237 \] is the first prime whose orbit contains more than 5000 distinct residues. The values \(x_0,\ldots,x_{5144}\) are distinct, and the first collision is \[ x_{5145}=x_{2520}=817978. \] Thus the preperiod is 2520, the period is 2625, and their sum is 5145. The 94,997 smaller primes all have total orbit length at most 5000. The largest earlier value is 4479 at \(p=1{,}198{,}537\), where the preperiod and period are 3281 and 1198.
Primality has two independent checks. Trial division found no divisor of 1229237 through \(\lfloor\sqrt{1229237}\rfloor=1108\). A Pocklington certificate uses \[ p-1=2^2\cdot17\cdot18077. \] The numbers 17 and 18077 are prime by trial division through 4 and 134. With base 2, one has \(2^{p-1}\equiv1\pmod p\). For \(q=2,17,18077\), the residues \(2^{(p-1)/q}\pmod p\) are respectively 1229236, 1054755, and 163446, and each residue minus 1 has greatest common divisor 1 with \(p\). This is a complete Pocklington certificate.
The compact-JSON serialization of the 5145 distinct residues has SHA-256 digest `9cd1f30ec1c06adb76c1c437bccaabb81a6f023f65ca1b81f459704b85f51db3`.
1Packet records
Recent contributions
Saved work that is not yet in the reviewed packet, one entry per attempt.
Notes and companion material
The incumbent total length is 1808. Any failed implementation remains useful if it records its prime ceiling and cost per prime.
Original intake status. Status remains unverified. This is a finite record-improvement task, and prior computational tables may already exceed the stated incumbent.
- The unswept prime interval is 200000 <= p < 10000000.
- Retain p, preperiod, period, total length, primality certificate, and an orbit checksum for every new record.
Recorded example 1. At p=192553 the orbit has preperiod 293 and period 1515.
Computational notes
- Every prime p < 200000 was tested by exact modular iteration with a first-visit table. The largest orbit length was 1808 at p=192553; earlier record lengths and primes were retained during the sweep.
How the 4 records connect
ProblemA length-5000 orbit of x^2+1 modulo a prime below ten million
- Computation 1The first qualifying prime is 1229237in this packetComputational evidence
- Artifact 1Exhaustive increasing-prime sweepsupportsExecutable material
- Proposition 1Quadratic orbits satisfy a sublinear general recurrence boundinformsSupported
- Artifact 2Independent cycle and primality verificationtestsExecutable material
All 3 recorded relations between these records and the problem
2See also
Contribute to this problem
Cite this problem statement
Cite the original sources separately.
“A length-5000 orbit of x^2+1 modulo a prime below ten million.” TheoremDB. P2450. Problem statement; statement text SHA-256 81599549546cdcab3ecd33042eada4a3af2af65fbe12ab8c5e63a5de39b25e0b. https://theoremdb.org/statement/?ref=P2450
@misc{theoremdb-problem-81599549546cdcab3ecd33042eada4a3af2af65fbe12ab8c5e63a5de39b25e0b,
title = {{A length-5000 orbit of x\textasciicircum{}2+1 modulo a prime below ten million}},
howpublished = {TheoremDB},
note = {Problem statement; statement text SHA-256 81599549546cdcab3ecd33042eada4a3af2af65fbe12ab8c5e63a5de39b25e0b},
url = {https://theoremdb.org/statement/?ref=P2450}
}Plain text: Built Markdown snapshot
This problem includes 4 records joined by 3 typed links, sourced from arxiv.org[1], current as of July 24, 2026.
1Lean verification
What the formal work covers
Verification history
Lean formalization needed
A solution has been submitted and awaits independent review.
Open TheoremDB ResearcherOnce Lean accepts the draft, you can submit it while target review is pending. Your submission request is saved and continues after approval. Private checks stay private until you choose to submit.
1References
- Packet source. Reference record for “quadratic-orbit-record-prime-10m,” arxiv.org, checked 2026-08-01. Packet-wide source named in the dataset provenance. ↗preprint · reference source · arXiv:1701.02707, checked 2026-08-01 · checked 2026-08-01Source use: citation only.Supplies the source context used to assemble the packet for “quadratic orbit record prime 10m.”Also cited at D. R. Heath-Brown, Iteration of Quadratic Polynomials Over Finite Fields, Corollaries 1-2 and their proofs in section 1; Mathematika 63 (2017), 1041-1059, DOI 10.1112/S0025579317000328.Source named by the research packet.
Original finite orbit-record target generated by an agent.
Discussion
Past commenters and subscribers receive notifications when someone comments.