Pith. sign in

REVIEW 4 major objections 5 minor 1 cited by

On arithmetic terms expressing the prime-counting function and the n-th prime

T0 review · 4 major / 5 minor · reviewed 2026-08-11 · deepseek-v4-flash

Pith's one-line read For every positive integer n, the n-th prime equals a fixed arithmetic term, and the paper writes that term down.

desk verdict The omega(n) construction is real and clever, but the paper never actually produces the advertised arithmetic term for p(n), so the main claim is not demonstrated. read the letter →

arxiv 2412.14594 v2 pith:XHP25XRD submitted 2024-12-19 math.NT

classification math.NT MSC 11A4111A2503D20
keywords arithmetictermprime-countingfunctionn-thprimeomegahypercubemethodexponentialDiophantineequationelementaryclosedformHammingweight
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper constructs fixed-length arithmetic terms for the prime-counting function $\pi(n)$ and for the $n$-th prime $p(n)$: expressions built from a finite, fixed set of additions, subtractions, multiplications, integer divisions, and exponentiations, with no variable-length sums or loops. The route runs through a new arithmetic term for $\omega(n)$, the number of distinct prime divisors of $n$, and the identity $\omega(n!) = \pi(n)$, which yields a term for the prime-counting function. For $p(n)$, the authors build an exponential Diophantine equation in 42 variables whose number of natural-number solutions is exactly $p(n)$, then use the hypercube method to count those solutions as the Hamming weight of a single enormous integer. If the construction is correct, it gives a constructive, though computationally prohibitive, answer to the classical question of whether there is a formula for the $n$-th prime.

What carries the argument

The load-bearing device is the hypercube method: it packs the values of an exponential polynomial on a finite $k$-dimensional cube into the binary expansion of a single integer $W$, so that the number of zeros $d$ of the polynomial can be recovered from the Hamming weight by $d=HW(W)/u-t^k$. The method requires two parameter terms, a cube side $t(n)$ and a value bound $2^{u(n)}$; the paper sets $t(n)=2^{2^{2n^4+16}}$ and $u(n)=2^{29t(n)+8+9}$ for the final 42-variable count. A second essential ingredient is a new arithmetic term for binomial coefficients based on linear-recurrence sequences that simulate Pascal's triangle, which lowers the quantified-variable count and shrinks the monomial expansion from 10102 to 498 terms. The generalized geometric progressions $G_r(q,t)$ supply the closed forms for the sums over the cube that enter each term of $W$.

What would settle it

Compute, for $n>32$, the maximum of $(x_1^2 - n x_2 - 1)^2$ over $0\le x_1,x_2<n$; if it ever reaches $2^{n+5}$, the hypercube count used for $N(n)$, $\omega(n)$, $\pi(n)$, and $p(n)$ breaks. As printed, the paper's verification statement for Lemma 5.1 is already false at $n=1$, because the pair $(0,0)$ gives $-1 < 2^6$, so the stated check is not the check the proof needs.

Watch

Extended reading notes

Core claim

The paper's central claim is a chain of explicit arithmetic terms. The modular square-root counting function satisfies $N(n)=HW(M(4n))/(u(4n)-t(4n)^2)$ with $t(n)=n+1$ and $u(n)=n+5$; from this one gets $\omega(n)=\nu_2(N(4n))-1$, and then $\pi(n)=\omega(n!)$. The culminating term for the $n$-th prime is $p(n)=HW(\widehat{Q}(n))/(u(n)-t(n)^{42})$, where $t(n)=2^{2^{2n^4+16}}$, $u(n)=2^{29t(n)+8+9}$, and $\widehat{Q}(n)$ is assembled by the hypercube method from the 498-monomial expansion of $\hat{F}(n,\vec{x})=0$ printed in Appendix A. That equation has the additional property that, for each $n$, its number of solutions in $\mathbb{N}^{42}$ is exactly $p(n)$. The paper presents this as the first fixed-length elementary closed-form expression for the $n$-th prime, and derives from it the recurrence $x(n+1)=p(\pi(x(n))+1)$, which starting from 2 reproduces the prime sequence.

Load-bearing premise

The entire construction rests on the unproved assertion that for every $n$, every value of $(x_1^2 - n x_2 - 1)^2$ on the square $0\le x_1,x_2<n$ stays below $2^{n+5}$; the paper verifies this only for $n$ up to 32 and then assumes the exponential dominates forever.

Editorial extensions

If this is right

  • For every positive integer $n$, $p(n)$ is a fixed arithmetic expression in $n$, so the prime sequence is generated by the recurrence $x(n+1)=p(\pi(x(n))+1)$ with $x(1)=2$.
  • The same construction gives an arithmetic term for $\pi(n)$, since $\pi(n)=\omega(n!)$ and $\omega$ has an arithmetic term.
  • Appendix A's 42-variable equation is an exponential Diophantine equation whose number of solutions in natural numbers is exactly $p(n)$ for every $n$.
  • The terms are universal but impractical: they involve iterated exponentials of $n$, so evaluating them for any nontrivial $n$ is far beyond computational reach.
  • The classical open question about a formula for the $n$-th prime receives a constructive answer in the paper's accepted sense of arithmetic term, conditional on the bounding lemma.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The printed verification in Lemma 5.1 appears to check the wrong inequality (the raw expression rather than its square, and it is false at $n=1$); a repaired proof of the squared bound would leave the main formulas intact, but until such a proof exists the whole chain is conditional.
  • If the construction is right, the apparent 'order' of the primes is being located in the counting step rather than in the Diophantine equation itself, which suggests the same single-fold machinery could produce arithmetic terms for other counting functions such as the sum-of-divisors function.
  • The paper leaves open whether the iterated-exponential size of $t(n)$ and $u(n)$ is necessary; a natural testable extension is to search for smaller bounds or shorter monomial expansions that still make the hypercube count work.
  • Because the final term's evaluation is astronomically large even for small $n$, the result should be read as an expressibility theorem; practical prime generation would require an entirely different encoding.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 5 minor

Summary. The paper claims to present the first fixed-length elementary closed-form expressions (arithmetic terms) for the prime-counting function π(n) and the n-th prime p(n). The route is: build an arithmetic term M(n) counting square roots of unity modulo n via Mazzanti's hypercube method; derive ω(n) = ν2(N(4n)) - 1; obtain π(n) = ω(n!); then construct a 42-variable exponential Diophantine equation F̂(n, x) = 0 whose number of natural solutions is p(n). Theorem 10.1 states p(n) = HW(Q̂(n))/(u(n) - t(n)^42) with t(n) = 2^{2^{2n^4+16}}, u(n) = 2^{29t(n)+8+9}, and Q̂(n) described as the arithmetic term constructed by the hypercube method from the monomial expansion in Appendix A. The paper also gives Maple and SageMath code for several of the auxiliary terms.

Significance. If the construction were fully carried out, the paper would settle a long-standing question in a precise formal sense: it would give a fixed-length elementary expression for the n-th prime, going beyond Mazzanti's existence theorem by providing an explicit syntactic object. The intermediate idea of routing p(n) through ω(n!) and the modular-square-root counting function is attractive, and the inclusion of code for some pieces is a strength. However, the central object of the paper—the arithmetic term for p(n)—is never actually written down, and the bound proofs contain demonstrable errors. As it stands, the manuscript does not deliver the advertised result, so its significance cannot be assessed beyond the level of a proposed method.

major comments (4)
  1. [§10, Theorem 10.1; Appendix A; Appendix D] The theorem does not provide the arithmetic term for p(n). It defines Q̂(n) only as 'the arithmetic term constructed by the hypercube method from the monomial expansion' of F̂(n, x) = 0, and Appendix A gives only the polynomial F̂ itself. Appendix D's code prints the polynomial expansion; it does not print or evaluate the sum of the C42(·) and A42(·) terms that would constitute Q̂(n). Since an arithmetic term is a fixed-length syntactic expression built from {+, −, ·, /, x^y}, an algorithmic description or an existence sentence is not a substitute for the term itself. This is not a presentation issue: the explicit term for p(n) is the advertised central result, and it is absent.
  2. [§5, Lemma 5.1] The numerical verification in Lemma 5.1 is both false as printed and directed at the wrong inequality. The text claims that for n ≤ 32 the set of pairs (x1, x2) in the cube with x1^2 - n x2 - 1 < 2^{n+5} is empty; for n = 1, x1 = x2 = 0, the value is -1 < 64, so the set is not empty. More importantly, the hypercube method requires a bound on the squared polynomial (x1^2 - n x2 - 1)^2 < 2^{u(n)}, not on the unsquared expression. The subsequent sentence that 'the distance between the exponential function and the polynomial one is permanently increasing' is an assertion, not a proof, and it does not address the squared quantity. Since Lemma 5.1 is the basis for N(n), ω(n), π(n), and ultimately p(n), this is a load-bearing gap.
  3. [§9, Lemma 9.10] The stated bound x8 < 2^{n+2} is false. From equation (24), the variable x8 is the slack variable d satisfying x7 + (4x2 + 5)(-x5^2 + x8 - 2^n) = 0, hence x8 = 2^n + (4x2 + 1)^2 - x7/(4x2 + 5). For n = 2 and x2 = 2, this gives x8 = 4 + 81 - 4 = 81, which is larger than 2^{n+2} = 16. The final bound in Lemma 9.11 may still be true because other variables dominate, but the proof as written contains an incorrect bound in a lemma that is supposed to establish the cube size for the hypercube method.
  4. [§9, Lemma 9.11] The proof of the universal bound contains two unproved and incorrectly stated steps. It says 'Since (n!)² ≤ 2^{n^3} for all n ∈ N' immediately after substituting x2 = (n²)!, so the displayed inequality should concern (n²)! rather than (n!). In addition, the inequality (2^{n^3+3} + 3)^3 + 12 < 2^{2n^4+16} is asserted with no justification. These are not cosmetic details, because the entire applicability of Theorem 10.1 depends on the cube side t(n) bounding every quantified variable.
minor comments (5)
  1. [Appendix A] The LaTeX of the monomial expansion has lost many superscripts and has broken line structure (for example, expressions like '35x2\n2x3\n2' appear), so the printed 498-monomial expansion cannot be checked without running the code. The appendix should be regenerated with preserved superscripts or replaced by a machine-readable file.
  2. [Appendix B and Appendix C] The Maple and SageMath code contains typos that hinder reproducibility, such as 'HW_airth' in the Maple listing and the use of 'padic:-ordp' without the necessary package setup; the text also warns that inserted newlines may break compilation. These should be corrected.
  3. [§5, Remark 5.1] Remark 5.1 says that one could use t(n) = 4n and u(n) = 4n + 4, while Lemma 5.1 uses t(4n) = 4n + 1 and u(4n) = 4n + 5. The notation should be harmonized to avoid confusion about which function is being evaluated.
  4. [§5, Eq. (18)] Equation (18) is called 'the full arithmetic term for M(n)', but it is displayed as a rational expression with fractions. Since the language of arithmetic terms uses integer division, the paper should state explicitly how each displayed quotient is interpreted and why the numerator is divisible by the denominator.
  5. [§1, Abstract and Introduction] The phrase 'first fixed-length elementary closed-form expressions' should be qualified in view of Mazzanti's earlier existence theorem; the paper's contribution is the explicit construction, and the introduction should state that distinction precisely.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the arithmetic terms are constructed by independent Diophantine counting; the only self-citations are peripheral.

full rationale

The derivation chain is non-circular. N(n) is obtained by applying Mazzanti's hypercube method to the independent Diophantine equation (x1^2 - n*x2 - 1)^2 = 0; the count of its solutions is the number of modular square roots of unity, with no reference to primes. omega(n) is then obtained from the proved CRT identity nu2(N(4n)) - 1 = omega(n) (Lemma 5.2), and pi(n) from the proved identity omega(n!) = pi(n) with Robinson's externally cited factorial term. For p(n), the paper counts a <= n^2 satisfying N(4(a!)) <= 2n, which is equivalent by Lemma 7.2 to pi(a) < n; the equality of this count with p(n) is the independent Jones bound cited by the authors, not a fitted value, and p(n) never appears as an input to the construction. The final hypercube expression HW(hatQ(n))/(u(n)-t(n)^42) is asserted as the count of solutions of the explicit equation hatF(n,x)=0, so the target value is the output rather than the input. The only self-citations (the simpler gcd term from [13] and source code derived from [15]) are not load-bearing: the standard gcd and factorial terms from Mazzanti/Marchenkov and Robinson are also cited and would serve the same role. The unproved exponential-dominance assertion in Lemma 5.1 and the fact that hatQ(n) is not written down are correctness/completeness concerns, not circularity.

Assumptions & free parameters 0 free parameters · 4 assumptions · 0 invented entities

No parameters are fitted to data; t(n) and u(n) are chosen bounds. The load-bearing assumptions are standard theorems plus two unverified computational or manual assertions: the universal bound in Lemma 5.1 and the correctness of the 498-monomial expansion. The final term Q is not an invented entity but an unexhibited object whose construction is promised.

assumptions (4)
  • standard math Chinese Remainder Theorem and the classical root-counting facts for x^2 ≡ 1 mod 2^k and mod p^k (Lemma 5.2).
    Used to relate the count N(4n) of square roots of unity to omega(n).
  • standard math The hypercube method of Mazzanti/Matiyasevich converts a bounded exponential polynomial into an arithmetic term counting its zeros.
    This is the core engine of the paper; the authors cite [17,18] and do not re-prove it.
  • ad hoc to paper In Lemma 5.1, the inequality (x1^2 - n*x2 - 1)^2 < 2^(n+5) is asserted for all points in the cube after a numerical check for n ≤ 32 and an appeal to permanent exponential dominance.
    The printed check appears to state the opposite condition and no complete proof is supplied; this bound is load-bearing for N(n), omega(n), pi(n), and p(n).
  • domain assumption The 498-monomial expansion in Appendix A is the exact expansion of the sum-of-squares system (equation 24).
    The appendix gives Sage code but no independent certificate; the final arithmetic term depends on this expansion being bug-free.

how reviews work

0 comments
Cite this review

Pith. "Pith review of On arithmetic terms expressing the prime-counting function and the n-th prime." pith.science (2026). https://pith.science/paper/XHP25XRD

@misc{pith2026241214594,
  author       = {Pith},
  title        = {Pith review of: On arithmetic terms expressing the prime-counting function and the n-th prime},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/XHP25XRD}},
  note         = {Machine review of arXiv:2412.14594}
}
abstract

We present the first fixed-length elementary closed-form expressions for the prime-counting function, $\pi(n)$, and the $n$-th prime number, $p(n)$. These expressions are arithmetic terms, requiring only a finite and fixed number of elementary arithmetic operations from the set: addition, subtraction, multiplication, integer division, and exponentiation. Mazzanti proved that every Kalmar function can be represented as an arithmetic term. We develop an arithmetic term representing the prime omega function, $\omega(n)$, which counts the number of distinct prime divisors of a positive integer $n$. From this term, we find immediately an arithmetic term for the prime-counting function, $\pi(n)$. Combining these results with a new arithmetic term for binomial coefficients and novel prime-related exponential Diophantine equations, we manage to develop an arithmetic term for the $n$-th prime number, $p(n)$, thereby providing a constructive solution to the fundamental question: Is there an order to the primes?

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Prime-Interval Algebras

    math.NT 2026-07 accept novelty 6.0 of 10

    For every n, a binomial/gcd quotient R_n and one modular exponentiation produce a polynomial whose nonzero support is exactly the primes in (n,2n]; when n is prime, the least support degree is the next prime.

Reference graph

Works this paper leans on

23 extracted references · 20 canonical work pages · cited by 1 Pith paper

  1. [1]

    Grzegorczyk

    A. Grzegorczyk. Some Classes of Recursive Functions. Rozprawy Matematyczne, 4, 1953. URL http://matwbn.icm.edu.pl/ksiazki/rm/rm04/rm0401.pdf

  2. [2]

    Kolpakov and A

    A. Kolpakov and A. A. Rocke. On the Impossibility of Discovering a Formula for Primes Using AI. arXiv e-prints , 2023. URL https://arxiv.org/abs/2308.10817

  3. [3]

    C. P. Willans. On Formulae for the Nth Prime Number. The Mathematical Gazette , 48(366): 413–415, 1964. doi: 10.2307/3611701

  4. [4]

    G. F. Simmons. Calculus Gems: Brief Lives and Memorable Mathematics . American Mathematical Society, 2007. ISBN 978-1-4704-5128-8

  5. [5]

    G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers . Clarendon Press, Oxford, first edition, 1938. JFM 64.0093.03, Zbl 0020.29201

  6. [6]

    G. H. Hardy and E. M. Wright. An Introduciton to the Theory of Numbers . Oxford University Press, fourth edition, 1975. ISBN 0198533107

  7. [7]

    I. Oitavem. New Recursive Characterizations of the Elementary Functions and the Functions Com- putable in Polynomial Space. Revista Matem´ atica de la Universidad Complutense de Madrid, 10(1): 109–125, 1997. URL http://eudml.org/doc/44242

  8. [8]

    J. P. Jones. Formula for the Nth Prime Number. Canadian Mathematical Bulletin , 18(3):433–434,

Show all 23 references
  1. [9]

    J. P. Jones, D. Sato, H. Wada, and D. Wiens. Diophantine Representation of the Set of Prime Numbers. The American Mathematical Monthly , 83(6):449–464, 1976. ISSN 0002-9890

  2. [10]

    Robinson

    J. Robinson. Existential Definability in Arithmetic. Transactions of the American Mathematical Society, 72(3):437–449, 1952. ISSN 0002-9947

  3. [11]

    K. Devlin. Mathematics: The New Golden Age . Columbia University Press, 2001. ISBN 978- 0231116398

  4. [12]

    du Sautoy

    M. du Sautoy. The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics . Harper Perennial, 2012. ISBN 978-0062064011

  5. [13]

    Prunescu and J

    M. Prunescu and J. M. Shunia. Arithmetic-Term Representations for the Greatest Common Divisor,

  6. [14]

    Prunescu and L

    M. Prunescu and L. Sauras-Altuzarra. An Arithmetic Term for the Factorial Function.Examples and Counterexamples, 5:100136, 2024. ISSN 2666-657X. URL https://sciencedirect.com/science/ article/pii/S2666657X24000028

  7. [15]

    Prunescu and L

    M. Prunescu and L. Sauras-Altuzarra. On the Representation of Number-Theoretic Functions by Arithmetic Terms, 2024. URL https://arxiv.org/abs/2407.12928

  8. [16]

    N. K. Vereschchagin and A. Shen. Computable Functions. American Mathematical Society, 2002. Translated by V. N. Dubrovskii

  9. [17]

    Mazzanti

    S. Mazzanti. Plain Bases for Classes of Primitive Recursive Functions.Mathematical Logic Quarterly, 48(1):93–104, 2002. ISSN 0942-5616

  10. [18]

    S. S. Marchenkov. Superpositions of Elementary Arithmetic Functions. Journal of Applied and Industrial Mathematics , 1(3):351–360, 2007. ISSN 1990-4789

  11. [19]

    T. Y. Chow. What is a Closed-Form Number? The American Mathematical Monthly , 106(5):440–,

  12. [20]

    Yu. V. Matiyasevich. Primes are Nonnegative Values of a Polynomial in 10 Variables. Journal of Soviet Mathematics , 15:33–44, 1981. ISSN 1573-8795. doi: https://doi.org/10.1007/BF01404106

  13. [21]

    Yu. V. Matiyasevich. Hilbert’s Tenth Problem. MIT press, 1993. ISBN 0-262-13295-8. 41

  14. [1975]

    doi: 10.4153/CMB-1975-081-7

  15. [2024]

    URL https://arxiv.org/abs/2411.06430

Pith tools

Reviewed August 11, 2026 · model on record in the stance chip above.