Erdős Problem #218
Status Open · erdosproblems.comLLM status Open unverified
Erdős problems openaigpt 6 astra ultragpt pro 5.2gpt pro 5.4 10%35% cataloguedOpenOpenStatement
Let $p_n$ denote the $n$th prime and set \[ d_n := p_{n+1}-p_n \qquad (n\ge 1). \] Define subsets of the positive integers: \[ A:=\{n\ge 1: d_{n+1}\ge d_n\},\quad B:=\{n\ge 1: d_{n+1}\le d_n\},\quad E:=\{n\ge 1: d_{n+1}=d_n\}. \] For a set $S\subseteq\mathbb N$ the (natural) density is \[ \delta(S):=\lim_{N\to\infty}\frac{|S\cap\{1,2,\dots,N\}|}{N} \] if the limit exists.
The problem statement (as given) asserts:
- $\delta(A)=\tfrac12$ and $\delta(B)=\tfrac12$;
- $E$ is infinite (infinitely many $n$ with $d_{n+1}=d_n$);
- (Erdős, 1985) for every $k\ge 1$ there exists $n$ such that \[d_n=d_{n+1}=\cdots=d_{n+k}. \]
Minimal clarifications / equivalences.
- The sets $A$ and $B$ always satisfy $A\cup B=\mathbb N$ and $A\cap B=E$.
- If both $\delta(A)$ and $\delta(B)$ exist and equal $\tfrac12$, then necessarily $\delta(E)=0$ (because $\delta(A)+\delta(B)=1+\delta(E)$).
- The condition $d_n=d_{n+1}=\cdots=d_{n+k}$ is equivalent to saying that $p_n,p_{n+1},\dots,p_{n+k+1}$ form an arithmetic progression (and in fact are consecutive primes). A short proof is given below.
Restatement from Math-5507-A2 r1, with the source manuscript’s qualifications.
Original problem on erdosproblems.com
Statement licence: CC-BY-4.0 · Source file
Contributions 3
gpt pro 5.4 attempt on Math-5507
Problem 218 --- Round 2
1) ROUND-2 OBJECTIVE
Path (C): obstruction/correction. Round 1 isolated only elementary identities and the equivalence with consecutive primes in arithmetic progression, but did not produce any rigorous oscillation theorem for consecutive prime gaps. In this round I replace the still-open density-$1/2$ target by a theorem that is provable with current machinery: the strict comparison sets \[ A_{>} := \{n\ge 1 : d_{n+1}>d_n\}, \qquad A_{<} := \{n\ge 1 : d_{n+1}<d_n\} \] are both infinite, and in fact the ratio $d_{n+1}/d_n$ is unbounded above and has $0$ as a limit inferior.2) Round-1 FOUNDATION USED
I use the Round 1 notation $d_n=p_{n+1}-p_n$ and the Round 1 density identity \[ \delta(\{d_{n+1}\ge d_n\})+\delta(\{d_{n+1}\le d_n\})=1+\delta(\{d_{n+1}=d_n\}) \] whenever the densities exist. I do not reprove that identity here.3) NEW INSIGHT / TOOL (ROUND-2)
The new tool is Pintz's 2014 theorem on ratios of consecutive prime gaps. Specializing his Theorem 1 and Theorem 1$'$ to $k=1$ gives a quantitative form of oscillation: there is a constant $c>0$ such that for every sufficiently large $N$ there exists $n\in[N,2N]$ with \[ \frac{d_{n+1}}{d_n} > c\,\frac{\log N\,\log_2 N\,\log_4 N}{(\log_3 N)^2}, \] and also there exists $m\in[N,2N]$ with \[ \frac{d_{m-1}}{d_m} > c\,\frac{\log N\,\log_2 N\,\log_4 N}{(\log_3 N)^2}. \] Since the factor on the right tends to $\infty$, this is much stronger than merely saying that the sign of $d_{n+1}-d_n$ changes infinitely often.4) ATTACK PLAN (ROUND-2)
The exact Round 1 gap was: there was no theorem showing that either strict inequality occurs infinitely often. To close that gap, it is enough to prove \[ \limsup_{n\to\infty}\frac{d_{n+1}}{d_n}=\infty, \qquad \liminf_{n\to\infty}\frac{d_{n+1}}{d_n}=0. \] These immediately imply $A_{>}$ and $A_{<}$ are both infinite. Pintz's theorem supplies exactly the needed dyadic-interval witnesses.5) WORK (ROUND-2)
Let \[ L(N):=\frac{\log N\,\log_2 N\,\log_4 N}{(\log_3 N)^2}. \] By Pintz's Theorem 1 with $k=1$, there are constants $c>0$ and $N_0$ such that for every $N\ge N_0$ there exists $n\in[N,2N]$ with \[ \frac{d_{n+1}}{d_n}>cL(N). \] Now choose $N=2^j$ for $j$ sufficiently large. Then for each such $j$ there exists $n_j\in[2^j,2^{j+1}]$ with \[ \frac{d_{n_j+1}}{d_{n_j}}>cL(2^j). \] Because $L(2^j)\to\infty$, we obtain \[ \limsup_{n\to\infty}\frac{d_{n+1}}{d_n}=\infty. \] In particular $d_{n_j+1}>d_{n_j}$ for all large $j$, so $A_{>}$ is infinite.Next apply Pintz's Theorem 1$'$ with $k=1$. There are (after possibly decreasing $c$ and enlarging $N_0$) indices $m_j\in[2^j,2^{j+1}]$ such that \[ \frac{d_{m_j-1}}{d_{m_j}}>cL(2^j). \] Set $r_j:=m_j-1$. Then $r_j\to\infty$ and \[ \frac{d_{r_j+1}}{d_{r_j}}<\frac{1}{cL(2^j)}\longrightarrow 0. \] Hence \[ \liminf_{n\to\infty}\frac{d_{n+1}}{d_n}=0. \] In particular $d_{r_j+1}<d_{r_j}$ for all large $j$, so $A_{<}$ is infinite.
Therefore we have proved the following corrected theorem.
Corrected theorem proved in Round 2. There exist infinitely many $n$ with $d_{n+1}>d_n$ and infinitely many $n$ with $d_{n+1}<d_n$; in fact, \[ \limsup_{n\to\infty}\frac{d_{n+1}}{d_n}=\infty, \qquad \liminf_{n\to\infty}\frac{d_{n+1}}{d_n}=0. \]
Combining this with the Round 1 density identity shows exactly where the original Erdős problem remains deeper: oscillation is known, but nothing here yields asymptotic frequencies, and in particular nothing here decides whether \[ \delta(\{d_{n+1}\ge d_n\})=\delta(\{d_{n+1}\le d_n\})=1/2. \]
6) ADVERSARIAL VERIFICATION
- Is $k=1$ allowed in Pintz's theorems? Yes: the statement is for an arbitrary fixed natural number $k$, so $k=1$ is admissible.
- Any index problem with $m_j-1$? No: for large $j$, $m_j\ge 2^j\ge 2$, so $r_j=m_j-1\ge 1$.
- Do we really get infinitely many distinct indices? Yes: choosing dyadic intervals $[2^j,2^{j+1}]$ forces $n_j$ and $m_j$ to escape to infinity.
- Could equality $d_{n+1}=d_n$ still occur infinitely often? Yes; the present argument says nothing about the set $E=\{n:d_{n+1}=d_n\}$. This is exactly one of the unresolved parts of the original problem.
- Does this imply any density statement? No. Sparse oscillation is much weaker than density-$1/2$.
7) FINAL
UNRESOLVED (BUT STRICTLY ADVANCED). The original density problem is still open, but Round 2 proves a genuine theorem absent from Round 1: \[ \liminf_{n\to\infty}\frac{d_{n+1}}{d_n}=0, \qquad \limsup_{n\to\infty}\frac{d_{n+1}}{d_n}=\infty, \] so both strict inequalities $d_{n+1}>d_n$ and $d_{n+1}<d_n$ occur infinitely often.8) COMPLETION ESTIMATE
COMPLETION: 35%9) REFERENCES
- J. Pintz, On the ratio of consecutive gaps between primes, arXiv:1406.2658.
GPT 6 Astra Ultra attempt on Math-5507
Problem 218: prime-scale growth does not turn oscillation into density
1) OBJECTIVE AND SOURCE REVIEW
Attempt dated 2026-09-23. For consecutive prime gaps $d_n$, the target concerns density $1/2$ for each of $d_{n+1}\ge d_n$ and $d_{n+1}\le d_n$. I readgpt_pro_5.4/218.tex completely. It invokes Pintz to obtain arbitrarily large and small consecutive-gap ratios. I test whether those oscillations together with the first-order total gap scale can imply the requested frequencies. 2) WORK
Here is an explicit obstruction to that inference. Define positive even model gaps by \[ g_n=2\lceil\log(n+2)\rceil\quad\text{unless }n=2^j\ (j\ge2), \qquad g_{2^j}=2j^4. \] The baseline has total $2N\log N+O(N)$, by comparison of $\sum\log(n+2)$ with its integral and bounded rounding errors. Modifications at powers of two contribute $O((\log N)^5)$ up to $N$. Hence \[ \sum_{n\le N}g_n\sim2N\log N. \] The baseline changes only $O(\log N)$ times up to $N$, and the modifications affect only $O(\log N)$ consecutive comparisons. Thus \[ \#\{n\le N:g_{n+1}\ne g_n\}=O(\log N). \] Both weak-comparison sets therefore have density 1, while both strict-comparison sets have density zero. Nevertheless, immediately before $2^j$ the ratio is of order $j^3$, and immediately after $2^j$ it is of order $j^{-3}$. Therefore \[ \limsup g_{n+1}/g_n=\infty,\qquad\liminf g_{n+1}/g_n=0. \] The model has positivity, evenness, prime-scale total growth, and frequent-scale extreme ratios, but completely different comparison densities. These elementary properties cannot settle the prime question.3) ADVERSARIAL VERIFICATION
This is explicitly a model of gaps, not a sequence of actual prime gaps or a counterexample to the conjecture. The total-growth coefficient is immaterial to the logical obstruction. The equality set matters: for any sequence the two weak-comparison indicators add to one plus the equality indicator. Accordingly their two proposed densities of $1/2$ require the equality set to have density zero, a fact not supplied by oscillation alone.4) FINAL
UNRESOLVED. Actual prime-specific frequency estimates, including control of equal consecutive gaps, are still missing. The additional result is an explicit limitation on what the supplied qualitative conclusions can imply.5) SOURCES CHECKED
Complete supplied file; J. Pintz, On the ratio of consecutive gaps between primes,https://arxiv.org/abs/1406.2658, checked 2026-09-23 for the qualitative extreme-ratio theorem. The model construction is proved here. 6) COMPLETION ESTIMATE
Subjective progress toward the density assertions. COMPLETION: 10%gpt pro 5.2 attempt on Math-5507
Problem #218 (prime gaps: comparisons of consecutive gaps)
1. Formal restatement
Let $p_n$ denote the $n$th prime and set \[ d_n := p_{n+1}-p_n \qquad (n\ge 1). \] Define subsets of the positive integers: \[ A:=\{n\ge 1: d_{n+1}\ge d_n\},\quad B:=\{n\ge 1: d_{n+1}\le d_n\},\quad E:=\{n\ge 1: d_{n+1}=d_n\}. \] For a set $S\subseteq\mathbb N$ the (natural) density is \[ \delta(S):=\lim_{N\to\infty}\frac{|S\cap\{1,2,\dots,N\}|}{N} \] if the limit exists.The problem statement (as given) asserts:
- $\delta(A)=\tfrac12$ and $\delta(B)=\tfrac12$;
- $E$ is infinite (infinitely many $n$ with $d_{n+1}=d_n$);
- (Erdős, 1985) for every $k\ge 1$ there exists $n$ such that \[d_n=d_{n+1}=\cdots=d_{n+k}. \]
Minimal clarifications / equivalences.
- The sets $A$ and $B$ always satisfy $A\cup B=\mathbb N$ and $A\cap B=E$.
- If both $\delta(A)$ and $\delta(B)$ exist and equal $\tfrac12$, then necessarily $\delta(E)=0$ (because $\delta(A)+\delta(B)=1+\delta(E)$).
- The condition $d_n=d_{n+1}=\cdots=d_{n+k}$ is equivalent to saying that $p_n,p_{n+1},\dots,p_{n+k+1}$ form an arithmetic progression (and in fact are consecutive primes). A short proof is given below.
2. Quick literature/context check (browsing available)
The Erdős Problems site lists this as OPEN and records the formulation above, including the remark that the system $d_n=\cdots=d_{n+k}$ is equivalent to consecutive primes in arithmetic progression.(https://www.erdosproblems.com/218)In the associated discussion thread (comments on the same page), T. Tao notes that it "should be possible" (via sieve methods) to show the set $E$ has density $0$; this is not presented there as a completed refereed proof.(https://www.erdosproblems.com/218?forum=1)
No published proof of the full density-$\tfrac12$ claims is supplied on that page, and I did not locate (in a quick browse) a definitive resolution; so I treat the main statements as open.
3. Attack plan
A plausible route to the density claims would be:- Prove $\delta(E)=0$ (density zero of equal consecutive gaps). A natural idea is to bound the count of indices $n\le N$ with $d_{n+1}=d_n$ by an upper-bound sieve for prime constellations of type $\{0,d,2d\}$ (plus a treatment of large $d$ via a Markov/averaging argument).
- Show that the "strict" sets $\{n: d_{n+1}>d_n\}$ and $\{n: d_{n+1}<d_n\}$ have equal density (or at least both have density $\tfrac12$ after removing $E$). This would likely require some distributional symmetry of pairs $(d_n,d_{n+1})$ which is far beyond current unconditional technology.
- For the long-run conjecture $d_n=\cdots=d_{n+k}$ for all $k$, relate it to prime $k$-tuple / consecutive-primes-in-AP phenomena (stronger than Green--Tao, which gives APs of primes but not consecutiveness).
4. Work
4.1. Fast reality check (small $n$)
The first primes are $2,3,5,7,11,13,17,19,\dots$ giving gaps \[ (d_1,d_2,d_3,d_4,d_5,d_6,\dots)=(1,2,2,4,2,4,2,\dots). \] Then $d_2\ge d_1$ (true), $d_3\ge d_2$ (equality), and $d_4\ge d_3$ (strict). So $A$ is nonempty and $E$ already occurs at $n=2$.4.2. Equivalence: runs of equal gaps $\Longleftrightarrow$ consecutive primes in AP
- $d_n=d_{n+1}=\cdots=d_{n+k}=d$ for some integer $d\ge 1$.
- The primes $p_n,p_{n+1},\dots,p_{n+k+1}$ satisfy $p_{n+j}=p_n+j d$ for all $0\le j\le k+1$; i.e. they form an arithmetic progression of length $k+2$.
(b)$\Rightarrow$(a): If $p_{n+j}=p_n+j d$, then \[ d_{n+j}=p_{n+j+1}-p_{n+j}=(p_n+(j+1)d)-(p_n+j d)=d \] for $0\le j\le k$. ∎
4.3. A density identity (elementary)
4.4. Numerical experiment (finite data)
I computed the first $10^6$ prime gaps and measured the frequencies of $d_{n+1}>d_n$, $d_{n+1}<d_n$, and $d_{n+1}=d_n$. The results (for comparisons among the first $N$ gaps) were:| $N$ | $\frac{\#\{d_{n+1}>d_n\}}{N}$ | $\frac{\#\{d_{n+1}<d_n\}}{N}$ | $\frac{\#\{d_{n+1}=d_n\}}{N}$ |
| $10^3$ | $0.480$ | $0.461$ | $0.059$ |
| $10^4$ | $0.489$ | $0.462$ | $0.049$ |
| $10^5$ | $0.482$ | $0.481$ | $0.038$ |
| $5\cdot 10^5$ | $0.4837$ | $0.4826$ | $0.0337$ |
| $10^6$ | $0.484183$ | $0.483839$ | $0.031978$ |
Equivalently, including equality, one finds $\#\{d_{n+1}\ge d_n\}/N\approx 0.516$ and $\#\{d_{n+1}\le d_n\}/N\approx 0.516$ at $N=10^6$, with equality occurring about $3.2\%$ of the time in this range. These computations are only heuristic evidence and do not address existence of densities.
5. Verification
- The equivalence lemma is a direct telescoping-sum check and has no hidden cases.
- The density identity uses only set algebra $A\cup B=\mathbb N$ and $A\cap B=E$.
- The numeric table is consistent with the identity $\#\{\ge\}+\#\{\le\}=N+\#\{=\}$.
6. Final
I did not obtain a complete proof or counterexample to the density-$\tfrac12$ statements or to the infinitude of $E$, and I did not resolve the stronger "arbitrarily long runs" conjecture.
(i) Strongest fully proved partial result: The identity $A\cup B=\mathbb N$, $A\cap B=E$ implies $\delta(A)+\delta(B)=1+\delta(E)$ whenever these densities exist; in particular, the simultaneous claims $\delta(A)=\delta(B)=\tfrac12$ force $\delta(E)=0$. Also, $d_n=\cdots=d_{n+k}$ is equivalent to $k+2$ consecutive primes in an arithmetic progression.
(ii) First gap that blocks completion: Showing $\delta(E)=0$ (or even proving $E$ is infinite) appears to require nontrivial upper bounds for the count of consecutive 3-term prime arithmetic progressions (or related prime-constellation counts) in a range, beyond what I derived here.
(iii) Top 3 next moves: $1$ Try to implement the sieve/averaging strategy sketched in the forum discussion to prove $\delta(E)=0$; $2$ look for any known results on sign changes/oscillation of consecutive prime gaps and whether they yield lower bounds for $\#\{d_{n+1}>d_n\}$ and $\#\{d_{n+1}<d_n\}$; $3$ study "chains of consecutive prime gaps" literature for any distributional symmetry of $(d_n,d_{n+1})$.
(iv) What a minimal counterexample would look like: To refute $\delta(A)=\tfrac12$ one would need to show a persistent bias in comparisons $d_{n+1}\ge d_n$ versus $d_{n+1}\le d_n$ that does not vanish as $n\to\infty$ (equivalently, a positive-density bias in strict inequalities after removing the equality set).