# P2484: Closest prime square to the cube of a prime below one trillion

- ID: `P2484`
- Reference: `prime-cube-prime-square-gap-trillion`
- Page: https://theoremdb.org/statements/P2484
- Record maturity: Reviewed problem with recorded work

## Problem

For each prime \(p\) with \(10^6\le p\le10^{12}\), let \(q_-(p)<p^{3/2}<q_+(p)\) be the two primes adjacent to \(p^{3/2}\). Determine \(\min_p\min\{p^3-q_-(p)^2,\,q_+(p)^2-p^3\}\).

### Problem setup

- **Definition.** The adjacent primes are the largest prime below p^(3/2) and the smallest prime above it.
- **Remark.** The two displayed differences are positive integers.

### What counts as a solution

- Give a prime pair attaining the minimum and a complete certificate that every prime p in the stated interval has both adjacent-prime gaps at least that large.

## Status

An exact sweep over all 4,117,976,315 prime bases through \(p=10^{11}\) finds prefix minimum 49,600 at \(p=1587809\) and \(q=2000771023\); the range \(10^{11}<p\le10^{12}\) remains unswept, so the requested full-range minimum remains open. [3](#reference-3)

## Work

### Evidence for the current status

**Computation 1 (The minimum gap through p=100 billion is 49,600).** An exact sweep over all 4,117,976,315 prime bases through \(p=10^{11}\) finds prefix minimum 49,600 at \(p=1587809\) and \(q=2000771023\); the range \(10^{11}<p\le10^{12}\) remains unswept, so the requested full-range minimum remains open.

For every prime \(p\) satisfying
\[
10^6\leq p\leq10^{11},
\]
the smaller distance between \(p^3\) and the square of either adjacent prime around \(p^{3/2}\) is at least 49,600. Equality occurs at
\[
p=1587809,\qquad q_-(p)=2000771023,
\]
where
\[
p^3=4003084686476516129,
\]
\[
q_-(p)^2=4003084686476466529,
\]
and
\[
p^3-q_-(p)^2=49600.
\]

The segmented sieve enumerated 4,117,976,315 prime bases in the stated interval. For each base it computed the exact integer square root of \(p^3\). Only four nearest-integer square gaps were at most 49,600. The displayed pair supplies the sole prime square among them. The other three square bases are even:
\[
2113144738,\quad59120053422,\quad1049747744368.
\]
Their gaps are 24,315, 17,767, and 25,895. Since their square bases are composite, they cannot enter the prime-restricted minimum.

### Background and intake notes

The certified interval for the answer is 2 through 49600. The lower bound follows because the square and cube of odd primes are odd, while the upper bound comes from an exact prime pair.

- Original intake status: Status remains unverified. Searches related to Hall-type square-cube approximation are extensive, while the prime restrictions and this exact range may be new.
- For each p, only the adjacent primes around p^(3/2) need testing. A complete sweep should retain primality certificates for p, q_-(p), and q_+(p), together with every new gap record.
- Segmented sieving can distribute the prime bases. The neighboring primes may cross segment boundaries, so each block certificate must include enough overlap to prove adjacency.

- Recorded example: For p=1587809 and q=2000771023, one has p^3=4003084686476516129, q^2=4003084686476466529, and p^3-q^2=49600.

### Other known results

- **Theorem 1** (established): Every square closest to p^3 has base floor(sqrt(p^3)) or its successor. [1](#reference-1)
- **Computation 2** (reproduced): Fully factored n-1 certificates establish primality, and q=floor(sqrt(p^3)) proves lower adjacency. [2](#reference-2)

### Prior approaches

- **Route 1** (supported): The full answer lies between 2 and 49,600; this entry settles the prefix through 100 billion. [3](#reference-3)

### Runnable artifacts

- **Artifact 1** (reproduced): A low-memory C program sieves every base prime, computes exact nearest-square gaps, and hashes all 4.1 billion result triples.
- **Artifact 2** (reproduced): Standard-library Python verifies complete n-1 factorizations, all witnesses, adjacency, and the gap.

### Computational notes

- Every one of the 70435 primes with 1000000 <= p < 2000000 was tested. For each p, exact integer square roots and deterministic primality searches found the adjacent primes on both sides.
- The smallest gap in the checked prefix was 49600 at p=1587809 and q=2000771023. Both numbers were independently verified prime, and exact integer arithmetic replayed the displayed difference.

### Working on this

Connect over MCP (https://api.theoremdb.org/mcp) and call `orient` with problem_ref `prime-cube-prime-square-gap-trillion`, the intent matching the work, and a task query that names the action, scope, and method. Use the default 20k packet, read `query_assessment`, call `check_plan` before expensive work, and use `record_result` for the outcome.

## References

1. <a id="reference-1"></a>Stål Aanderaa, Lars Kristiansen, and Hans Kristian Ruud, A Preliminary Report on Search for Good Examples of Hall's Conjecture, arXiv:1401.4345v1 (2014). Elementary monotonicity argument used by the exact sweep; Hall-type nearest-square search context in Aanderaa, Kristiansen, and Ruud https://arxiv.org/abs/1401.4345
   - preprint; primary source; arXiv:1401.4345v1; checked 2026-08-01
   - Source use: original_summary
   - Reports Hall-type nearest-square searches and examples used to compare the packet's exact finite sweep.
2. <a id="reference-2"></a>Laurent Théry, Primality Tests and Prime Certificate, arXiv:2203.16341v1 (2022). Section 6, especially Theorems 6.1 and 6.2 https://arxiv.org/abs/2203.16341
   - preprint; primary source; arXiv:2203.16341v1; checked 2026-08-01
   - Source use: original_summary
   - States the Pocklington certificate theorem used to verify the incumbent prime in the packet artifact.
3. <a id="reference-3"></a>Noam D. Elkies, Rational points near curves and small nonzero |x^3-y^2| via lattice reduction, arXiv:math/0005139 (2000). Marshall Hall, The Diophantine equation x^3-y^2=k, Computers in Number Theory (1971), 173-198; Noam Elkies, Rational points near curves and small nonzero |x^3-y^2| via lattice reduction, arXiv:math/0005139; Stål Aanderaa, Lars Kristiansen, and Hans Kristian Ruud, Search for good examples of Hall's conjecture, Mathematics of Computation 87 (2018), DOI 10.1090/MCOM/3298; R. C. Baker, G. Harman, and J. Pintz, The difference between consecutive primes, II, Proceedings of the London Mathematical Society 83 (2001), DOI 10.1112/plms/83.3.532 https://arxiv.org/abs/math/0005139
   - Also cited at Exact sweep in pcpsg-artifact-segmented-sweep-100-billion and primality certificate in pcpsg-artifact-pocklington-incumbent
   - preprint; primary source; arXiv:math/0005139v1; checked 2026-08-01
   - Source use: original_summary
   - Develops lattice-reduction methods for small nonzero cube-square gaps, which provide the computational setting for this search.
   - Source named by the research packet.
