Prime sums are sums taken over primes. They include the sum of the first primes,
|
(1)
|
where is a positive
integer and
is the
th prime.
This is the sum analog of the primorial
function. The first few terms are 2, 5, 10, 17, 28, 41, 58, 77, ... (OEIS A007504).
Bach and Shallit (1996) show that
|
(2)
|
and provide a general technique for estimating such sums.
For a real number , let
|
(3)
|
where the sum is over primes and is the prime
counting function. The prime number theorem
gives
, so the preceding estimate
implies
|
(4)
|
Since and
, it follows that
|
(5)
|
Here is the upper cutoff on the primes
being summed, rather than their number.
For , the sharp upper bound is
|
(6)
|
where
|
(7)
| |||
|
(8)
|
(OEIS A182170; F. M. Jackson, pers. comm., May 10, 2012). Equality in the first inequality
holds only for ,
when
. The bound follows
from direct computation for
and the explicit estimate of Axler (2019, p. 297) for larger
.
The first few values of
such that
is prime are 1, 2, 4, 6, 12, 14, 60, 64, 96, 100,
... (OEIS A013916). The corresponding values
of
are 2, 5, 17, 41, 197, 281, 7699,
8893, 22039, 24133, ... (OEIS A013918).
The first few values of
such that
are 1, 23, 53, 853, 11869, 117267, 339615, 3600489, 96643287, ... (OEIS A045345).
The corresponding values of
are 2, 874, 5830, 2615298, 712377380, 86810649294, 794712005370, 105784534314378,
92542301212047102, ... (OEIS A050247; Rivera),
and the values of
are 2, 38, 110, 3066, 60020, 740282, 2340038, 29380602, 957565746, ... (OEIS A050248;
Rivera).
In 1737, Euler showed that the harmonic series of primes, (i.e., sum of the reciprocals of the primes) diverges
|
(9)
|
(Nagell 1951, p. 59; Hardy and Wright 1979, pp. 17 and 22), although it does so very slowly.
A rapidly converging series for the Mertens constant
|
(10)
|
is given by
|
(11)
|
where is the Euler-Mascheroni
constant,
is the Riemann zeta function, and
is the Möbius function
(Flajolet and Vardi 1996, Schroeder 1997, Knuth 1998).
Dirichlet showed the even stronger result that
|
(12)
|
(Davenport 1980, p. 34). Despite the divergence of the sum of reciprocal primes, the alternating series
|
(13)
|
(OEIS A078437) converges (Robinson and Potter 1971), but it is not known if the sum
|
(14)
|
does (Guy 1994, p. 203; Erdős 1998; Finch 2003).
There are also classes of sums of reciprocal primes with sign determined by congruences
on , for example
|
(15)
|
(OEIS A086239), where
|
(16)
|
(Glaisher 1891b; Finch 2003; Jameson 2003, p. 177),
|
(17)
|
(OEIS A086240; Glaisher 1893, Finch 2003), and
|
(18)
|
(OEIS A086241), where
|
(19)
|
(Glaisher 1891c; Finch 2003; Jameson 2003, p. 177).
Although
diverges, Brun (1919) showed that
|
(20)
|
where is Brun's
constant. Its numerical value is estimated as
|
(21)
|
(OEIS A065421). The estimate uses extrapolation of the uncomputed tail.
The function defined by
|
(22)
|
taken over the primes converges for and is a generalization of the Riemann
zeta function known as the prime zeta function.
Consider the positive integers with prime factorizations
|
(23)
|
where the
are distinct primes, the
are positive integers,
and
is odd.
Thus there are an odd number of prime
factors, counted with multiplicity. The first
few such numbers are 2, 3, 5, 7, 8, 11, 12, 13, 17, 18, 19, 20, 23, 27, 28, 29, ...
(OEIS A026424). For a positive
integer
,
|
(24)
| |||
|
(25)
| |||
|
(26)
|
(Gourdon and Sebah), where
is the Riemann zeta function. The first few
terms are then
|
(27)
| |||
|
(28)
| |||
|
(29)
| |||
|
(30)
|
Consider the analogous sum over squarefree integers
having an odd number of prime
factors, i.e.,
is odd and
. The first few such numbers are 2, 3, 5,
7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 42, ... (OEIS A030059),
which include the composite numbers 30, 42, 66,
70, 78, 102, ... (OEIS A093599). Then
|
(31)
| ||||
|
(32)
| ||||
|
(33)
|
(Gourdon and Sebah). The first few terms are then
|
(34)
| |||
|
(35)
| |||
|
(36)
| |||
|
(37)
|
The sum
|
(38)
| |||
|
(39)
| |||
|
(40)
|
(OEIS A086242) is also finite (Glaisher 1891a; Cohen; Finch 2003), where
|
(41)
|
is the totient
function, and
is the Riemann zeta function.
Some curious sums satisfied by primes include
|
(42)
|
giving the sequence 0, 2, 18, 60, 270, 462, 1080, ... (OEIS A078837; Doster 1993) for , 3, 5, ..., and
|
(43)
|
giving the sequence 0, 2, 30, 120, 630, 1122, 2760, ... (OEIS A078838; Doster 1993),
|
(44)
|
giving the sequence 0, 1, 12, 45, 225, 396, 960, 1377, ... (OEIS A331764; J.-C. Babois, pers. comm., Jan. 31, 2021),
|
(45)
| |||
|
(46)
|
for , where
is the Mangoldt function,
and
|
(47)
|
for real (Berndt 1994, p. 114).
Let be the number of ways an integer
can be written as a sum
of two or more consecutive primes. For example,
, so
and
, so
. The sequence of values
of
for
, 2, ... is given by 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1,
... (OEIS A084143). The following table gives
the first few
such that
for small
.
| OEIS | values of | |
| 1 | A050936 | 5, 8, 10, 12, 15, 17, 18, 23, 24, 26, 28, 30, 31, 36, ... |
| 2 | A067372 | 36, 41, 60, 72, 83, 90, 100, 112, 119, ... |
| 3 | A067373 | 240, 287, 311, 340, 371, 510, 660, 803, ... |
Similarly, the following table gives the first few such that
for small
.
| OEIS | values of | |
| 1 | A084146 | 5, 8, 10, 12, 15, 17, 18, 23, 24, 26, 28, 30, 31, 39, ... |
| 2 | A084147 | 36, 41, 60, 72, 83, 90, 100, 112, 119, 120, 138, ... |
Now consider instead the number of ways in which a number
can be represented as a sum of one
or more consecutive primes (i.e., the same sequence
as before but one larger for each prime number).
Amazingly, it then turns out that
|
(48)
|
(Moser 1963; Le Lionnais 1983, p. 30).