The harmonic series, the "prime harmonic series", and their difference
Harmonic series
Consider the harmonic series . Apparently, it was Donald Knuth who in 1968 (vol 1 of TAOCP, section 1.2.7 “Harmonic numbers”) gave the name “harmonic number” and the notation to the partial sums of this series:
It turns out that where the terms for powers are .
Prime harmonic series
What about adding only the reciprocals of the prime numbers, namely
where we sum reciprocals of primes under some value ?
This too diverges, though very slowly: it follows from the second theorem of Mertens that
where is the Meissel–Mertens constant 0.26149721…. Here, for the error term , Mertens proved that ; this paper (see also this math.SE question and this MO question) shows that changes sign infinitely often; and this 2016 paper by Pierre Dusart shows (its Theorem 5.6) that for .
The non-prime harmonic series
We can also take their difference, and consider
where we sum the reciprocals of non-prime integers under some value .
Being the difference of the two, this will grow like
Further questions
-
What if we take the above “prime harmonic series” and “composite harmonic series” to terms, instead of using values up to ? (We’ll need estimates for the th prime and th composite number respectively.)
-
What about inverting these functions, i.e. given some , finding value of at which (or the prime harmonic series, or composite harmonic series) attains (or, first exceeds) the value ? Can we estimate the asymptotics of that function?
Some of these questions are answered in this Colab notebook.