Abstract
The Lambert W function, implicitly defined by , is a relatively “new” special function that has recently been the subject of an extended upsurge in interest and applications. In this note, I point out that the Lambert W function can also be used to gain a new perspective on the distribution of the prime numbers.
MSC:
11A41 (Primes); 11N05 (Distribution of primes)
1. Introduction
The Lambert W function, implicitly defined by the relation , has a long and quite convoluted 250-year history, but only recently has it become common to view this particular function as one of the standard “special functions” of mathematics [1]. Applications range over an extremely broad range [1,2], from combinatorics (for instance in the enumeration of rooted trees) [1], to delay differential equations [1], to falling objects subject to linear drag [3], to the evaluation of the numerical constant in Wien’s displacement law [4,5], to quantum statistics [6], to constructing the “tortoise” coordinate for Schwarzschild black holes [7], etcetera. In this brief note I will indicate some apparently new applications of the Lambert W function to the distribution of primes, specifically to the prime counting function and estimating the n’th prime .
2. The Prime Counting Function
Theorem 1.
The prime counting function satisfies
Proof.
First observe that . Second recall the standard result that for . (See Rosser [8], or any standard reference book on prime numbers, for example [9,10].) Then we have , so implying . Invert, noting that the right hand side (RHS) is monotone increasing, to see that , certainly for (corresponding to ). Then explicitly check validity of the inequality on the domain . Finally, use the definition of the Lambert W function to note ☐
Corollary 1.
Theorem 2.
The prime number theorem, , is equivalent to the statement
Proof.
Trivial. Note that asymptotically . (The only potential subtlety is that we are using the principal branch of the W function, denoted whenever there is any risk of confusion [1].) ☐
Corollary 2.
So we have derived both a strict upper bound on and an asymptotic equality. This is, so far, essentially a re-packaging of well-known results in terms of the Lambert W function.
When it comes to developing an analogous lower bound on , the situation is considerably more subtle. First consider the well-known upper bound on [9,10,11]:
Note that . Now consider the elementary inequality
with equality only at , and observe that (here and below we shall generically use to represent an arbitrarily small positive number) this implies
now with equality only at . This inequality explicitly captures the well-known fact that the logarithm grows less rapidly than any positive power. Applied to the n’th prime this now implies
The inequality is much weaker than Equation (5), but much more tractable. Using logic identical to that of Theorem 1, it is easy to convert this into the inequality
This is now easily inverted to obtain:
Theorem 3.
The prime counting function satisfies ():
For any fixed , this it is easy to check that inequality holds at least for , corresponding to . But, depending on the specific value , the domain of validity may actually be larger. That is, the inequality holds for with , corresponding to with . For instance, numerically solving gives , whence . (As always, there is a trade-off between the tightness of the bound and domain of validity of the bound; sometimes it is worthwhile to consider a simpler less-stringent bound that is valid over a wider domain; sometimes it is worthwhile to consider an uglier but tighter bound that might be valid over a smaller domain).
Corollary 3.
After explicitly checking the domain of validity we have:
where numerically .
The particular corollary above has perhaps the best trade-off in terms of elegance and wide domain of validity. Other related corollaries, again chosen for their (comparative) elegance and wide domain of applicability, may be determined analytically:
Corollary 4.
Setting , and explicitly checking the domain of validity, we have:
Corollary 5.
Choosing the specific case , and explicitly checking the domain of validity, we have:
Corollary 6.
Choosing the specific case , the domain of validity is the entire positive half line ():
This last of these corollaries, (), exhibits somewhat poorer bounding performance at intermediate values of x, but eventually overtakes corollary 5, (), once , and then asymptotically provides a better bound. Numerous variations on this theme can also be constructed, amounting to different ways of approximating the logarithms appearing in Equation (5).
In summary, we have used the Lambert W function to obtain a number of bounds, and some general classes of bounds, on the prime counting function in terms of the Lambert W function . We shall now turn attention to the n’th prime .
3. The ’th Prime
Theorem 4.
The n’th prime satisfies
Here is the second real branch of the Lambert W function, which is a strictly negative function defined on the domain .
Proof.
We start from the fact that , this inequality certainly being valid for , corresponding to [12]. Inverting, (and appealing to the monotonicity of ), we have , certainly for . Explicitly inspecting shows that the actual domain of validity is indeed . ☐
Corollary 7.
Proof.
Note that the function is monotone increasing on . So we see that , and the claimed inequality certainly holds for . For verify the claimed inequality by explicit computation. ☐
The virtue of this specific corollary is that it now holds for all positive integers.
There are many other variations on this theme that one could construct.
Theorem 5.
The prime number theorem, which can be written in the form , is equivalent to the statement
Proof.
Trivial. Consider the asymptotic result [1]
Then
☐
Comment: Note that use of the Lambert W function, simply because its asymptotic expansion contains both and terms, automatically yields the first two terms of the Cesàro–Cippola asymptotic expansion [13,14]:
We can even obtain the first three terms of the Cesàro–Cippola asymptotic expansion by refining the prime number theorem slightly as follows:
Theorem 6.
We note that use of the Lambert W function yields both a strict upper bound and an asymptotic result.
In counterpoint, to obtain a lower bound on we start with an upper bound on . Consider for instance the standard result [15]:
Note that the RHS of this inequality is monotone increasing for . Now we always have , so
This holds at the very least for , corresponding to , but an explicit check shows that it in fact holds for . This is perhaps more clearly expressed as
Inverting, and noting the constraint arising from the domain of definition of , we now obtain:
Theorem 7.
There are many other variations on this theme that one could construct.
To find some implicit bounds we use the old result (see for example Rosser [11]) that
Without an explicit calculation of these bounds are qualitative, rather than quantitative. Nevertheless it may be of interest to point out that a minor variant of the arguments above immediately yields:
Theorem 8.
It is now “merely” a case of estimating to turn these into explicit bounds. We have already seen that provides a widely applicable upper bound, and a widely applicable lower bound. Taking now makes it clear why
is such a good asymptotic estimate for .
4. Discussion
While the calculations carried out above are very straightforward, almost trivial, it is perhaps the shift of viewpoint that is more interesting. The Lambert W function provides (in this context) a “new” special function to work with, one which may serve to perhaps simplify and unify many otherwise disparate results. It is perhaps worth noting that the infamous “” terms that infest the analytic theory of prime numbers will automatically appear as the sub-leading terms in asymptotic expansions of the Lambert W function. Whether there is anything “deeper” at play will be deferred for future investigation.
Acknowledgments
This research was supported by the Marsden Fund, and by a James Cook fellowship, both administered by the Royal Society of New Zealand.
Conflicts of Interest
The author declares no conflict of interest.
Appendix A. The Lambert W Function
The Lambert W function is a multi-valued complex function defined implicitly by [1]
There are two real branches: defined for , and defined for . These two branches meet at the common point . It is common to use in place of when there is no risk of confusion.
Asymptotic expansions are [1]:
More details, and a Taylor expansion for , can be found in Corless et al. [1]. A key identity is:
References
- Corless, R.M.; Gonnet, G.H.; Hare, D.E.G.; Jeffrey, D.J.; Knuth, D.E. On the Lambert W function. Adv. Comput. Math. 1996, 5, 329–359. [Google Scholar] [CrossRef]
- Valluri, S.R.; Jeffrey, D.J.; Corless, R.M. Some Applications of the Lambert W Function to Physics. Can. J. Phys. 2000, 78, 823–831. [Google Scholar] [CrossRef]
- Vial, A. Fall with linear drag and Wien’s displacement law: Approximate solution and Lambert function. Eur. J. Phys. 2012, 33, 751. [Google Scholar] [CrossRef]
- Stewart, S.M. Wien Peaks and the Lambert W Function. Rev. Bras. Ensino Física 2011, 33, 3308. Available online: www.sbfisica.org.br (accessed on 5 April 2018). [CrossRef]
- Stewart, S.M. Spectral Peaks and Wien’s Displacement Law. J. Therm. Heat Transfer 2012, 26, 689–692. [Google Scholar] [CrossRef]
- Valluri, S.R.; Gil, M.; Jeffrey, D.J.; Basu, S. The Lambert W function and quantum statistics. J. Math. Phys. 2009, 50, 102103. [Google Scholar] [CrossRef]
- Boonserm, P.; Visser, M. Bounding the greybody factors for Schwarzschild black holes. Phys. Rev. D 2008, arXiv:0806.220978, 101502. [Google Scholar] [CrossRef]
- Barkley Rosser, J. The n’th Prime is Greater than n ln n. Proc. Lond. Math. Soc. 1938, 45, 21–44. [Google Scholar]
- Ribenboim, P. The Little Book of Big Primes; Springe: New York, NY, USA, 1991. [Google Scholar]
- Ribenboim, P. The New Book of Prime Number Records; Springer: New York, NY, USA, 1996. [Google Scholar]
- Barkley Rosser, J. Explicit Bounds for some functions of prime numbers. Am. J. Math. 1941, 64, 211–232. [Google Scholar] [CrossRef]
- Dusart, P. The kth prime is greater than k(ln k + ln ln k − 1) for k ≥ 2. Math. Comput. 1999, 68, 411–415. [Google Scholar] [CrossRef]
- Cesàro, E. Sur une formule empirique de M. Pervouchine. Comptes rendus 1894, 119, 848–849. (In French) [Google Scholar]
- Cipolla, M. La determinazione assintotica dell’nimo numero primo. Mat. Nap. 1902, 3, 132–166. (In Italian) [Google Scholar]
- Barkley Rosser, J.; Schoenfeld, L. Approximate Formulas for Some Functions of Prime Numbers. Ill. J. Math. 1962, 6, 64–97. [Google Scholar]
© 2018 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).