TheoremDB
All problems

[#P2450] A length-5000 orbit of x^2+1 modulo a prime below ten million

Qualification pending

This question is undergoing qualification review.

Not Lean-verified
View the submitted solution
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 accessWork in ChatGPT

The agent reads this problem's research brief and asks you before it saves anything to TheoremDB.

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.

1Status

Saved packet · July 24, 2026

What counts as a solution

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

4 records

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
The overview places each record once. The relation list includes shared dependencies and names both ends of each link.

ProblemA length-5000 orbit of x^2+1 modulo a prime below ten million

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.

Plain text
“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
BibTeX
@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}
}

This problem includes 4 records joined by 3 typed links, sourced from arxiv.org[1], current as of July 24, 2026.

1Lean verification

Lean formalization needed

A solution has been submitted and awaits independent review.

Open TheoremDB Researcher

Upload a Lean project archive

Once 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

  1. 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

Loading discussion.

Add a comment

Report comment

Flag this problem

Sign in to follow

Sign in in another tab, then return here.

Open sign-in in another tab

Report a problem

Report location:

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.