Weight × Level + Jump
A six-page introduction to the decomposition of increasing integer sequences, with the primes as the main application
1The construction
Let \(a(1)<a(2)<\cdots\) be integers. For each \(n\) put \(d(n)=a(n+1)-a(n)\) (the jump) and
\[ \ell(n)=\begin{cases} a(n)-d(n) & \text{if } a(n)-d(n)>d(n),\\ 0 & \text{otherwise.}\end{cases} \]If \(\ell(n)\neq0\), the weight \(k(n)\) is the least integer \(k>d(n)\) dividing \(\ell(n)\), and the level is \(L(n)=\ell(n)/k(n)\); then
\[ a(n)=k(n)\,L(n)+d(n)\qquad(\text{weight}\times\text{level}+\text{jump}). \]If \(\ell(n)=0\) we set \(k(n)=L(n)=0\) and call \(a(n)\) not decomposable (unclassified). A decomposable term is level-classified if \(k(n)>L(n)\) and weight-classified if \(k(n)\le L(n)\); ties \(k=L\) count as weight.
Three remarks fix the mechanics. Existence: if \(\ell>d\) then \(\ell\) itself is a divisor exceeding \(d\), so the minimum is over a non-empty finite set. Uniqueness: minimality pins \(k\); there is no parameter, window or threshold to choose, so \((d,k,L)\) are invariants of the sequence. Conversely \((d,k,L)\) recovers \(a(n)=kL+d\) and \(a(n+1)=a(n)+d\): the map is a change of coordinates on consecutive pairs. Locality: the triple depends on \(a(n)\) and \(a(n+1)\) only — on the primes, the word “next” in “next prime” is the only global input, and the analytic theory of §4–§5 turns on when it may be dropped.
\(a(n)\) is decomposable if and only if \(a(n+1)<\tfrac32\,a(n)\). On the primes the non-decomposable terms are exactly \(2,3,7\).
Note: \(5=3\cdot1+2\) is decomposable and 7 is not (\(\ell=3<4\)); captions listing the exceptions as 2, 3, 5 are wrong verified (A117078: \(a(3)=3\), \(a(4)=0\)).
The window criterion and the plane
Since \(kL=\ell\), we have \(k>L\iff k^2>\ell\iff k>\sqrt{\ell}\). Because \(k\) is the least divisor above \(d\), this gives the working form of the classification:
\[ a(n)\ \text{is level-classified}\iff \ell(n)\ \text{has no divisor in the window}\ \bigl(d(n),\sqrt{\ell(n)}\,\bigr]. \]In particular \(\ell\le d^2\) forces the level class (the window is empty) — the reason fast-growing sequences such as polynomials of degree \(\ge3\) are eventually all-level. Geometrically, each decomposable term is a lattice point \((k,L)\) on the hyperbola \(kL=\ell(n)\), and the diagonal \(k=L\) separates the classes. On log–log axes with equal decades the hyperbolae become anti-diagonal lines and the signed distance of a point from the diagonal is \(\log(k/L)/\sqrt2\): the classification is read off as distance from the diagonal, which is why every weight–level plot here is square with equal aspect.
| \(p\) | 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29 | 31 | 37 | 41 | 43 | 47 | 53 | 59 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| \(g\) | 1 | 2 | 2 | 4 | 2 | 4 | 2 | 4 | 6 | 2 | 6 | 4 | 2 | 4 | 6 | 6 | 2 |
| \(\ell\) | — | — | 3 | — | 9 | 9 | 15 | 15 | 17 | 27 | 25 | 33 | 39 | 39 | 41 | 47 | 57 |
| \(k\) | 0 | 0 | 3 | 0 | 3 | 9 | 3 | 5 | 17 | 3 | 25 | 11 | 3 | 13 | 41 | 47 | 3 |
| \(L\) | 0 | 0 | 1 | 0 | 3 | 1 | 5 | 3 | 1 | 9 | 1 | 3 | 13 | 3 | 1 | 1 | 19 |
| class | — | — | lev | — | tie | lev | wt | lev | lev | wt | lev | lev | wt | lev | lev | lev | wt |
Two patterns are already visible and both become theorems: every column with \(g=2\) has \(k=3\) (Lemma 4), and \(L=1\) occurs exactly where \(\ell\) is prime, except at \(p=13,31\) where \(\ell=3^2,5^2\) (Lemma 5).
2The base case: the natural numbers are the sieve of Eratosthenes
For \(a(n)=n\) and \(n\ge3\): \(d=1\), \(\ell=n-1\), \(k(n)=\operatorname{spf}(n-1)\) and \(L(n)=(n-1)/\operatorname{spf}(n-1)\), where spf is the smallest prime factor. Hence \(n\) is level-classified iff \(n-1\) is prime, and \(k=L\) iff \(n-1=r^2\) with \(r\) prime.
Read column by column, Proposition 1 is the sieve: the weight column \(k=r\) collects exactly the \(n\) for which \(n-1\) is first struck out by the prime \(r\), with natural density \(\tfrac1r\prod_{q<r}(1-\tfrac1q)\), and what survives every pass is the level row \(L=1\). For \(n\le10^7\) there are 664,579 level-classified terms \(=\pi(10^7)\) and 446 ties \(=\pi(3162)\), in 446 weight columns verified. On a general sequence the same rule — least divisor above a threshold — runs with a threshold that moves with the jump: that, and not an extension of the fundamental theorem of arithmetic, is the precise sense in which the construction generalises Eratosthenes.
3The primes: elementary theory
Write \(p=p_n\), \(g=g_n=p_{n+1}-p_n\) and \(\ell=p-g=2p_n-p_{n+1}\). The sequences are in the OEIS: weight A117078, level A117563, \(\ell\) A118534, gap A001223; level-classified A162174, weight-classified A162175, ties A121155, level-one A125830. For \(p>2\), \(g\) is even and \(\ell\) odd, so every divisor of \(\ell\), and hence \(k\) and \(L\), is odd.
For \(p>3\): \(k=3\iff g=2\). The lesser twin primes \(>3\) are exactly the primes of weight 3.
For every decomposable prime \(p\ge5\), exactly one of \(3\mid g\) and \(3\mid\ell\) holds.
If \(\ell\) is prime then \(L=1\). Conversely, \(L=1\) with \(\ell\) composite forces \(\ell\le g^2\), and this happens only at \(p=13,31\) for \(p\le4\cdot10^{18}\).
Corollary (balanced primes). If \(p_n-p_{n-1}=p_{n+1}-p_n\) then \(\ell=p_{n-1}\) is prime, so \(L=1\) and \(p_n\) is level-classified. Below \(10^7\) there are 21,837 balanced primes, all with \(L=1\) verified.
If \(p\) is level-classified with composite weight, then \(\ell\le(g-1)^3\). Such primes are exactly \(13, 31, 113, 131, 887\) up to \(4\cdot10^{18}\).
Below \(10^7\) the census finds exactly those five, with \((\ell,(g-1)^3)\) equal to \((9,27)\), \((25,125)\), \((99,2197)\), \((125,125)\), \((867,6859)\) verified; completeness to \(4\cdot10^{18}\) uses the maximal-gap table, and beyond it would require \(g_n<p_n^{1/3}\), which is open.
4Rarefaction: Theorem 1, and what its control shows
| \(x\) | decomposable | level | \(f(x)\) | level-one \(N_1\) | ties | \(f\), Cramér |
|---|---|---|---|---|---|---|
| \(10^3\) | 165 | 75 | 0.4545 | 24 | 3 | 0.4331 |
| \(10^4\) | 1,226 | 390 | 0.3181 | 135 | 6 | 0.3347 |
| \(10^5\) | 9,589 | 2,658 | 0.2772 | 880 | 8 | 0.2810 |
| \(10^6\) | 78,495 | 18,353 | 0.2338 | 5,953 | 12 | 0.2412 |
| \(10^7\) | 664,576 | 138,049 | 0.2077 | 44,011 | 28 | 0.2100 |
| \(10^8\) † | 5,761,452 | 1,078,707 | 0.1872 | 339,870 | 79 | — |
| \(10^{10}\) † | 455,052,508 | 71,670,808 | 0.1575 | — | 483 | — |
The argument, given in full in the treatise’s Appendix B, has four steps. The asterisk means it has survived internal audit across editions but has not been refereed.
(i) Normal form. Let \(s\) be the largest divisor of \(\ell\) with \(s\le g\). If \(\ell>g^3\), then \(p\) is level-classified iff \(\ell/s\) is prime, and then \((k,L)=(\ell/s,s)\). Proof. If level, then \(L\) is a divisor below \(k\), so \(L\le g\) and \(L\le s\); also \(\ell/s>g^2>g\) is a divisor, so \(k\le\ell/s\le\ell/L=k\). If \(k\) were composite, \(\operatorname{spf}(k)\) and \(k/\operatorname{spf}(k)\) would be divisors \(<k\), hence \(\le g\), giving \(k\le g^2<\ell/s\). The converse is direct. So a level prime with \(\ell>g^3\) is \(p=sP+g\) with \(P\), \(p\), \(p+g\) all prime — for \(p=37\): \(g=4\), \(s=3\), \(P=11\), the triple \((11,37,41)\) (here \(\ell<g^3\), but the normal form already holds).
(ii) Upper-bound sieve. Drop the condition that \(p+g\) be the next prime (this only enlarges the count). For fixed \((g,s)\) the three linear forms \(P,\ sP+g,\ sP+2g\) are prime simultaneously for \(\ll\mathfrak S(g,s)\,(x/s)/(\log x)^3\) values \(P\le x/s\), uniformly in \(g,s\le(\log x)^{O(1)}\) — the dimension-3 Selberg sieve (Halberstam–Richert).
(iii) Summation. Summing \(1/s\) over \(s\le g\) and then over \(g\le G\), with the singular series bounded on average, gives \(\ll x\,G\log G/(\log x)^3\).
(iv) Large gaps. At most \(x/G\) primes \(p\le x\) have \(g>G\), since gaps sum to about \(x\); the terms with \(\ell\le g^3\) have \(g\gg p^{1/3}\) and fall here too. Choosing \(G=(\log x)^{3/2}\) balances (iii) against (iv).
The exponent \(3/2\) is an artefact of step (iv). Weighting each \(g\) by a Gallagher-type gap probability instead suggests the true order \(x\log\log x/(\log x)^2\), i.e. \(f(x)\asymp\log\log x/\log x\); Figure 2(b) is consistent with that, though five decades cannot identify an exponent.1
The proof uses almost nothing about the primes beyond sieve dimension, and a random sequence of density \(1/\log x\) shows the same decay. So the rarefaction is largely a property of the construction at that density, not evidence of prime-specific structure. Theorem 1 is the framework’s first native theorem and closes a 2007 conjecture; its arithmetic content lies in what follows.
5The arithmetic content: a constant and a lock
Species I and the constant \(2C_2\)
The level-one stratum \(L=1\) (Species I) is, by Lemma 5, the set of primes for which \(p-g\) is again prime (plus 13 and 31): the three primes \(p-g,\ p,\ p+g\) in arithmetic progression with \(p+g\) the next prime. The Hardy–Littlewood singular series of the triple \(\{0,g,2g\}\) is \(\mathfrak S(g)=\prod_r(1-\nu_r(g)/r)(1-1/r)^{-3}\), with \(\nu_r(g)\) the number of residues mod \(r\) the triple occupies.
The local averages explain the constant. At \(r=2\) the factor is 4 for even \(g\) and 0 for odd \(g\), average 2. At odd \(r\) it is \((1-1/r)^{-2}\) when \(r\mid g\) (probability \(1/r\)) and \((1-3/r)(1-1/r)^{-3}\) otherwise, average \(r(r-2)/(r-1)^2\) — the twin-prime factor. Since \(\mathfrak S(g)\) is a product of local factors each depending only on \(g\bmod r\), the Chinese remainder theorem and absolute convergence of the tail turn the product of local averages into the global average. Numerically the average over \(g\le10^6\) is 1.320249; PARI/GP gives \(2C_2=1.3203236316937\ldots\) verified.
Assume (H1) the Hardy–Littlewood conjecture for \(\{0,g,2g\}\), with uniformity in \(g\) as specified in the treatise (§5.5), and (H2) a Gallagher-type model for the distribution of the gap. Then \(dN_1/dx\sim 2C_2/(\log x)^2\), i.e. \(N_1(x)\sim2C_2\,x/(\log x)^2\).
Only the asymptotic is conditional; its constant is Lemma 1. Convergence is slow: over \([10^6,10^7]\) the observed \(\Delta N_1\big/\!\int dt/\log^2t\) is 0.995 verified, not yet 1.32 — a finite-height defect of the exponential gap model, not of the singular series. Gap by gap, where no gap model is needed, the level-one counts follow the singular-series prediction to within a few per cent, and Species I separates from the random control near \(10^{7.6}\) in the direction the singular series predicts (treatise §5, §7). That separation, absent from the aggregate share, is the framework’s measurable arithmetic signal.
Columns and the congruence lock
Weight columns \(k=r\) need \(r\mid\ell\). For an odd prime \(r<p\): if \(r\mid g\) then \(r\nmid\ell\), since otherwise \(r\mid p\) — the lock proved. If \(r\nmid g\), the pair \((p,p+g)\) avoids the classes \(p\equiv0\) and \(p\equiv-g\), leaving \(r-2\) admissible classes, exactly one of which (\(p\equiv g\)) gives \(r\mid\ell\). Equidistribution over admissible classes therefore predicts
\[ \Pr\bigl[r\mid\ell \bigm| g\bigr]=\frac{1}{r-2}\quad(r\nmid g),\qquad 0\quad(r\mid g), \]instead of the naive \(1/r\). At \(r=3\) the prediction is 1: Proposition 2 is the lock at 3. These are the local factors of the Hardy–Littlewood series, read off a weight column: the additive datum \(g\) controls the multiplicative datum “which small primes divide \(\ell\)”.
| \(r\) | 5 | 7 | 11 | 13 | 17 | 19 | 23 |
|---|---|---|---|---|---|---|---|
| observed \(\Pr[r\mid\ell]\) | 0.3331 | 0.1962 | 0.1092 | 0.0887 | 0.0648 | 0.0572 | 0.0464 |
| predicted \(1/(r-2)\) | 0.3333 | 0.2000 | 0.1111 | 0.0909 | 0.0667 | 0.0588 | 0.0476 |
| naive \(1/r\) | 0.2000 | 0.1429 | 0.0909 | 0.0769 | 0.0588 | 0.0526 | 0.0435 |
| observed / predicted | 0.999 | 0.981 | 0.983 | 0.976 | 0.973 | 0.972 | 0.975 |
The 2–3% shortfall for \(r\ge7\) is systematic, not noise. The treatise models it cell by cell over pairs \((g,r)\) with a one-parameter law (its interior-credit law, §6) heuristic, not reproduced here. Whether that law is new relative to Lemke Oliver–Soundararajan’s biases between consecutive primes, which rest on the same Hardy–Littlewood bookkeeping with the consecutiveness condition, has not been settled.
6Ledger, open problems, and how to compute
| Item | Statement | Kind | Status |
|---|---|---|---|
| Lemma 2 | decomposable \(\iff a(n+1)<\frac32a(n)\); on primes all but 2, 3, 7 | native | proved |
| Prop. 1 | on \(\mathbb N\): \(k=\operatorname{spf}(n-1)\); level class = shifted primes | native | proved |
| Lemma 4 | \(k=3\iff g=2\) (\(p>3\)) | native | proved |
| Prop. 2 | exactly one of \(3\mid g\), \(3\mid\ell\) (founding Conj. 7, 8) | native | proved |
| Prop. 3 | composite-weight level \(\Rightarrow\ell\le(g-1)^3\) (founding Conj. 4) | native | proved; list complete to \(4\cdot10^{18}\) |
| Lemma 5 | \(L=1\iff\ell\) prime, except 13, 31 | native | proved to \(4\cdot10^{18}\) |
| Theorem 1 | \(N_{\rm lev}(x)\ll x\log\log x/(\log x)^{3/2}\) (founding Conj. 9) | native | proved* |
| Lemma 1 | line average of \(\mathfrak S(g)\) is \(2C_2\) | native | proved |
| Theorem 2 | \(N_1(x)\sim2C_2\,x/(\log x)^2\) | native | conditional (H1)+(H2) |
| Lock | \(r\mid g\Rightarrow r\nmid\ell\); rate \(1/(r-2)\) otherwise | native | proved; rate heuristic, verified |
| Problem 2 | are there infinitely many level-classified primes? | native | open |
| Conj. 1 | infinitely many primes of weight 3 = twin prime conjecture | classical | open |
| Conj. 2, 3, 5, 6 | column/line statements of Polignac type | classical | open |
Problem 2. Theorem 1 is an upper bound; nothing unconditional shows the level class is infinite. Balanced primes are level-classified, so infinitely many of them would settle it; but that is itself open (it follows from Hardy–Littlewood), and sieve methods alone cannot produce primes (the parity problem). Problem 2 is thus formally weaker than the balanced-prime problem, and no route to it is known. Goldbach does not appear in this framework, and nothing here bears on the Riemann Hypothesis.
Compute it yourself
The reference kernel (treatise §9, fordiv form): fordiv lists divisors in increasing order, so the first one above \(d\) is the weight.
\\ decomp(a, b): a = a(n), b = a(n+1). Returns [k, L, d], or [0, 0, d] if not decomposable.
decomp(a, b) = { my(d = b - a, l);
if (a <= 2*d, return([0, 0, d]));
l = a - d; fordiv(l, k, if (k > d, return([k, l/k, d]))) };
\\ dclass(r): 0 unclassified, 1 weight-classified (k <= L), 2 level-classified (k > L).
dclass(r) = if (!r[1], 0, if (r[1] > r[2], 2, 1));
\\ Census of the primes below x: [decomposable, level, level-one, ties].
census(x) = { my(v = [0, 0, 0, 0], r);
forprime (p = 2, x - 1, r = decomp(p, nextprime(p + 1));
if (!r[1], next); v[1]++;
if (r[1] > r[2], v[2]++); if (r[2] == 1, v[3]++); if (r[1] == r[2], v[4]++));
v };
census(10^6) \\ [78495, 18353, 5953, 12]
census(10^7) \\ [664576, 138049, 44011, 28] (about 2 s, PARI/GP 2.15.4)
Exercises: confirm Table 1 with decomp(prime(i), prime(i+1)); run \(n\mapsto n\) and recover Proposition 1; find the forced-level regime \(\ell\le d^2\) on a sequence of your own.
1 The treatise’s §4.4 prints the conjectured order with \((\log x)\) to the first power in the denominator; with that exponent it would contradict Theorem 1. The exponent is 2.
References
- R. Eismann, founding paper, arXiv:0711.0865 (2007); atlas and data at decompwlj.com. Errata to its printed figures are listed in Appendix A of the treatise.
- The Weight–Level–Jump Decomposition, pedagogical treatise, 10th ed. (19 Aug 2026): full proofs (Appendix B), census to \(10^{10}\), controls (§7), ledger (§8), kernels (§9).
- OEIS: A117078, A117563, A118534, A001223, A162174, A162175, A121155, A125830, A002386.
- G. H. Hardy, J. E. Littlewood, Some problems of ‘Partitio numerorum’ III, Acta Math. 44 (1923).
- H. Halberstam, H.-E. Richert, Sieve Methods, Academic Press (1974).
- P. X. Gallagher, On the distribution of primes in short intervals, Mathematika 23 (1976).
- H. Cramér, On the order of magnitude of the difference between consecutive prime numbers, Acta Arith. 2 (1936).
- J. Nagura, On the interval containing at least one prime number, Proc. Japan Acad. 28 (1952).
- T. Oliveira e Silva, S. Herzog, S. Pardi, Empirical verification of the even Goldbach conjecture and computation of prime gaps up to \(4\cdot10^{18}\), Math. Comp. 83 (2014).
- R. J. Lemke Oliver, K. Soundararajan, Unexpected biases in the distribution of consecutive primes, PNAS 113 (2016).