# P2670: Largest rainbow squarefree gap below 10^12

- ID: `P2670`
- Reference: `rainbow-squarefree-gap-1e12`
- Page: https://theoremdb.org/statements/P2670
- Record maturity: Reviewed problem with recorded work

## Problem

Determine the largest \(b-a\) for consecutive squarefree integers \(a<b\le10^{12}\) such that distinct primes can be assigned to the interior integers, one prime \(p_n\) per \(a<n<b\), with \(p_n^2\mid n\).

### Remarks

- **Remark.** The assignment must use a different prime for every interior integer.
- **Remark.** The endpoints are squarefree and every interior integer is nonsquarefree.

### What counts as a solution

- Give endpoints attaining the maximum, a distinct-prime assignment for the interior, and a complete segmented sweep with failed-matching certificates for longer gaps.

## Status

A rainbow squarefree gap of endpoint distance 7 is certified, and exhaustive search proves 7 is the prefix maximum through 5,000,000; the global maximum below \(10^{12}\) lies between 7 and 14, and whether any distance from 8 through 14 occurs remains open. [1](#reference-1)

## Work

### Evidence for the current status

**Proposition 1 (Published squarefree-gap computations give the global upper bound 14).** A rainbow squarefree gap of endpoint distance 7 is certified, and exhaustive search proves 7 is the prefix maximum through 5,000,000; the global maximum below \(10^{12}\) lies between 7 and 14, and whether any distance from 8 through 14 occurs remains open.

A rainbow interval is first an ordinary gap between consecutive squarefree integers. Published computations cover ordinary squarefree gaps through \(10^{18}\). Marmet's first-occurrence table places the first run of 14 consecutive nonsquarefree integers at
\[
1043460553364,
\]
which exceeds the present cutoff. The first runs of lengths 15 through 18 occur still higher, and the exhaustive computation reports no longer run through \(10^{18}\). The first run of 13 begins at
\[
82462576220.
\]
Therefore an ordinary gap with upper endpoint at most \(10^{12}\) contains at most 13 interior integers, and its endpoint distance is at most 14. The rainbow target consequently satisfies
\[
7\leq G(10^{12})\leq14.
\]
The lower bound comes from the explicit interval at 30,922. Resolving the target requires checking the distinct-prime condition after five million.

### Background and intake notes

Each candidate gap has a small bipartite graph, so both successful assignments and Hall obstructions are compact evidence.

- Original intake status: Status remains unverified. Standard maximal squarefree gaps are tabulated, while the distinct-square-prime matching restriction was generated in this session.
- Sieve every prime-square divisor, carry consecutive squarefree endpoints across segments, and run bipartite matching between interior positions and their square-prime divisors.
- Trap: choosing the least square divisor greedily can repeat a prime even when another full matching exists. Hall matching must be solved exactly.

- Recorded example: For endpoints 30922 and 30929, the six interior integers admit square-prime assignment (17,3,5,47,13,2) in increasing order.

### Other known results

- **Theorem 1** (established): Exact factorizations prove both endpoints squarefree and label the six interior integers by 17, 3, 5, 47, 13, and 2. [2](#reference-2)
- **Computation 1** (reproduced): An exhaustive square-divisor sieve and exact matching test find maximum endpoint distance 7, first attained at 30,922 and 30,929. [2](#reference-2)

### Prior approaches

- **Route 1** (supported): Published searches certify the surrounding ordinary gaps, but the distinct square-prime matching variant did not appear in the sources reviewed. [1](#reference-1) [2](#reference-2) [3](#reference-3) [4](#reference-4)

### Runnable artifacts

- **Artifact 1** (reproduced): Standard-library Python marks every prime-square multiple and uses augmenting paths to test distinct-prime assignments.

### Computational notes

- A sieve retained every prime p with p^2 dividing n through 5000000, and exact backtracking tested distinct-prime matchings in every squarefree gap. The largest rainbow gap was 7 at 30922 and 30929; its displayed assignment was replayed term by term.

### Working on this

Connect over MCP (https://api.theoremdb.org/mcp) and call `orient` with problem_ref `rainbow-squarefree-gap-1e12`, 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>Louis Marmet, “First occurrences of square-free gaps and an algorithm for their computation”. arXiv:1210.3829 (2012). Louis Marmet, First occurrences of square-free gaps and an algorithm for their computation, first-occurrence table; cross-checked against Michael J. Mossinghoff, Tomas Oliveira e Silva, and Timothy S. Trudgian, The distribution of k-free numbers, Mathematics of Computation 90 (2021), Table 3 https://arxiv.org/abs/1210.3829
   - Also cited at Abstract, algorithm, and first-occurrence table
   - preprint; reference source; arXiv:1210.3829, checked 2026-08-01; checked 2026-07-25
   - Source use: citation_only
   - For Largest rainbow squarefree gap below 10^12: Supports the statement, selected result, computational method, or current boundary recorded in the reviewed packet.
2. <a id="reference-2"></a>Michael J. Mossinghoff, Tomás Oliveira e Silva, and Timothy S. Trudgian, “The distribution of k-free numbers,” Mathematics of Computation 90(328) (2021), 907-929. DOI 10.1090/mcom/3581; arXiv:1912.04972v2. empirical gap discussion and Table 3 for k-free numbers https://arxiv.org/abs/1912.04972
   - Also cited at Section on gaps and Table 3
   - Also cited at Exact integer factorizations replayed in rsg-artifact-prefix-sieve-five-million
   - Also cited at Exact replay in rsg-artifact-prefix-sieve-five-million
   - preprint; reference source; arXiv:1912.04972, checked 2026-08-01; checked 2026-07-25
   - Source use: citation_only
   - For Largest rainbow squarefree gap below 10^12, this source supplies empirical squarefree-gap data adjacent to the packet's rainbow-matching target; it does not determine that exact target.
   - Source named by the research packet.
3. <a id="reference-3"></a>Angel Kumchev, Wade McCormick, Nathan McNew, Ariana Park, Russell Scherr, and Willow Ziehr, “Explicit bounds for large gaps between squarefree integers”. arXiv:2211.09975 (2022). Introduction and computational range discussion https://arxiv.org/abs/2211.09975
   - preprint; reference source; arXiv:2211.09975, checked 2026-08-01; checked 2026-07-25
   - Source use: citation_only
   - For Largest rainbow squarefree gap below 10^12, the reviewed source scope is Introduction and computational range discussion. The packet makes no inference beyond that cited scope.
4. <a id="reference-4"></a>OEIS contributors, A051681: first run of exactly n consecutive nonsquarefree integers. OEIS entry A051681, checked 2026-08-01. Terms 1 through 18 and references https://oeis.org/A051681
   - reference_database; reference source; checked 2026-07-25
   - Source use: citation_only
   - For Largest rainbow squarefree gap below 10^12, the reviewed source scope is Terms 1 through 18 and references. The packet makes no inference beyond that cited scope.
