1. Introduction
Prime numbers form one of the central structures of arithmetic [1]. Their distribution has shaped number theory from Euler’s formula to the prime number theorem and modern work on prime gaps [2]. The usual objects in this area are the prime-counting function, Chebyshev functions, divisor functions, and asymptotic estimates for the sequence of primes [3]. A simpler finite object also carries useful information: the sum of the first
primes. This sum records not only the size of the primes themselves, but also the way consecutive prime gaps accumulate through the sequence. To make this accumulation precise, we first write the prime sum in a fixed notation and then express each prime through the gaps that precede it.
Let
denote the
-th prime, and define the partial prime sum by
(1)
The central observation of this paper is that
has an exact decomposition in terms of consecutive prime gaps. If
(2)
then
(3)
The term
is the baseline contribution from the initial prime 2. The remaining term records the accumulated effect of the prime gaps. A gap
is not counted once. It is counted with weight
, because it affects every later prime from
through
. In this way, Formula (3) gives a finite history of how the prime sequence is built from its successive differences.
The motivation of this study is partly Ramanujan-inspired since Ramanujan’s work on highly composite numbers showed how arithmetic objects can be understood through structured decompositions, extremal behavior, and cumulative effects in multiplicative number theory [4]. In 1918, Hardy and Ramanujan’s work on partitions remains another model for reorganizing arithmetic information into forms where cumulative structure becomes visible [5]. Later, Nicolas and Robin studied Ramanujan’s work in detail and clarified its connection with divisor functions, prime factors, and extremal arithmetic behavior [6]. The finite sum of the first
primes belongs naturally to the classical theory of prime distribution. The prime number theorem gives the leading scale of prime growth, and Goldstein’s historical account explains how this subject developed from numerical evidence into rigorous asymptotic theory [7]. More recent works study
directly. For example, Axler obtained asymptotic formulas and explicit estimates for the sum of the first
primes [8]. Sinha also derived an asymptotic expansion for the same quantity and connected it with inequalities of Mandl and Robin type [9]. Although all these works address the analytic growth of
, the present paper serves a different purpose. It gives an exact finite decomposition that makes the contribution of each individual prime gap explicit. Prime gaps provide the natural language for this decomposition. The differences
contain fine information about the local behavior of the prime sequence. Soundararajan’s survey on small gaps between primes shows how deep this subject becomes when one studies the distribution and size of these gaps [10]. Here the gaps are used in a more elementary but exact way. They are not estimated statistically. They are placed into a finite weighted identity for
. This gives a direct bridge between local increments of the prime sequence and the global partial sum.
The same identity also has a geometric form. For fixed
, define
(4)
If an angle
is chosen so that
(5)
then
(6)
and the prime-sum identity becomes
(7)
This trigonometric expression is an encoding of the same finite identity, not an independent method for predicting primes. The angle
is defined from the gap
. The geometric form therefore preserves the arithmetic content of Formula (3) rather than adding new information about the distribution of primes.
A separate issue concerns divergent infinite sums. Ramanujan’s name is often connected with non-standard summation ideas, and Ramanujan sums continue to appear in modern mathematical and signal-processing settings [11]. Such methods have value when they are used inside a precise regularization framework. They are not ordinary finite summation. For this reason, the present paper keeps the finite identity separate from any regularized infinite interpretation. The series of all primes diverges in the ordinary sense, and any finite value assigned to it would require separate definitions and separate proofs. In fact, the present paper follows a related mathematical attitude: a finite arithmetic quantity is rewritten so that its internal structure becomes transparent.
As the conclusion, this paper accurately proves Formula (3), verifies it by finite examples, gives its geometric encoding, and compares its scale with the known asymptotic behavior of prime sums.
2. Prime Gaps and Partial Prime Sums
To prove the finite rearrangement precisely, we first fix the notation for the prime sequence, its consecutive gaps, and the partial sums built from them.
Let
(8)
be the increasing sequence of prime numbers. For each integer
, define the
-th prime gap by
(9)
Thus, the first few gaps are
(10)
These gaps recover the prime sequence by telescoping. For every
,
(11)
Since
, this becomes
(12)
Equation (12) is the basic finite relation used throughout the paper. It says that each prime is obtained from the first prime by adding all previous gaps.
We define the partial sum of the first
primes by
(13)
The notation
is used deliberately. In standard number theory,
denotes the number of primes not exceeding
. Using
for a sum of primes would conflict with this standard notation. In this case, the symbol
keeps the object clear.
The goal is to rewrite
in terms of the gaps
. A gap that occurs early in the prime sequence appears in many later primes. These repeated appearances are the source of the weights in the main formula.
For example, take
. The first five primes are
(14)
They can be written through gaps as
(15)
Adding the five lines in (15), the baseline 2 appears five times. The first gap
appears four times,
appears three times,
appears twice, and
appears once. Hence
(16)
This example shows the general pattern. In the sum
, the gap
appears exactly
times. The main theorem in the next section formalizes this observation.
3. Decomposition of Prime Sums
We now prove the finite identity stated in the Introduction. The proof will show that the sum of the first
primes is determined by the first prime and by a weighted record of the gaps that follow it.
Theorem 3.1. Prime-gap decomposition
For every integer
,
(17)
Equivalently,
(18)
Proof
From (12), each prime
can be written as
(19)
Summing (19) over
, we obtain
(20)
Separating the constant term gives
(21)
We now count how often each fixed gap occurs. The gap
appears in the inner sum exactly when
(22)
For a fixed
with
, this means
(23)
There are
such values of
. Therefore,
(24)
Substituting (24) into (21) gives
(25)
This proves the theorem.
Corollary 3.2. Accumulated gap contribution
For every integer
,
(26)
Proof
Subtract
from both sides of (17).
Formula (26) isolates the part of the prime sum produced by the gaps. The term
is only the contribution of the initial prime repeated
times. Everything beyond that baseline is carried by the weighted gap sum.
The weight
has a direct meaning. The gap
shifts every later prime from
through
. It therefore contributes once to each of those later primes. That is why it appears
times in
. Early gaps have larger weights. Later gaps have smaller weights.
Remark 3.3. Relation with finite differences.
The identity in Theorem 3.1 can also be read as a finite-difference form of summation by parts. The gaps
are the forward differences of the prime sequence. Writing each prime as the initial value
plus the accumulated forward differences, and then summing over
, gives the weights
. Thus Formula (17) is not a new summation method. It is the standard finite reconstruction of a sequence from its first term and its forward differences, followed by a finite change in summation order. Its usefulness here is that it makes the contribution of each individual prime gap visible inside the partial prime sum.
The notation in the decomposition is summarized in Table 1. The table is included to make clear that the index
refers to primes, while the index
refers to gaps. This distinction prevents a common confusion in formulas involving prime sums.
Table 1. Notation and arithmetic role in the prime-gap decomposition.
Symbol |
Definition |
Role |
|
k-th prime |
prime being summed |
|
|
gap between consecutive primes |
|
|
sum of the first
primes |
|
gap multiplicity |
number of later primes affected by
|
|
copies of
|
baseline contribution |
4. Numerical Verification and Finite Examples
The decomposition is finite, so it must agree exactly with ordinary prime sums. The examples below check the identity in small cases and show how the weights appear in practice.
For
, the first five primes are
(27)
The corresponding gaps are
(28)
Using Theorem 3.1, we get
(29)
Substituting the gaps gives
(30)
The ordinary sum gives the same value:
(31)
For
, the first six primes are
(32)
Their gaps are
(33)
The decomposition gives
(34)
Thus
(35)
Again, this matches the direct computation
(36)
The same verification for several small values of
is given at Table 2. Each row compares the ordinary sum with the weighted-gap expression. The agreement is exact because both columns represent the same finite identity.
Table 2. Exact verification of the prime-gap decomposition for small prime sums.
|
First n primes |
Weighted-gap expression |
|
5 |
|
|
28 |
6 |
|
|
41 |
7 |
|
|
58 |
8 |
|
|
77 |
The triangular pattern of the weights is visible in the table. For
, the first gap has weight 7, the second has weight 6, and the weights decrease by one until the final gap has weight 1. The arithmetic variation comes from the gaps themselves, while the weight pattern comes only from the finite summation structure.
The same structure is also visible in Figure 1. For
, the figure displays
Figure 1. Weighted contribution of prime gaps to
.
both the decreasing multiplicity
and the actual weighted contribution
.
This plot separates two effects: the deterministic decline of the weights and the arithmetic variation of the gaps. The
-th gap
contributes with weight
, so early gaps have the largest structural influence on the finite prime sum.
5. Geometric Encoding of Weighted Gaps
The prime-gap decomposition also has a useful geometric form. This section does not introduce a new prime-generating rule but it gives an exact visual encoding of the same finite identity proved in Theorem 3.1. It records the factor
as a slope-height product and makes the weighted nature of the gap contribution visible in a single diagram.
Fix an integer
. For each gap
, define
(37)
The number
is the multiplicity of the gap
in the sum
. Define an angle
by
(38)
Equivalently,
(39)
Substituting (39) into the gap decomposition gives
(40)
Since
, we obtain
(41)
Using
, this becomes
(42)
Proposition 5.1. Geometric form
For every integer
,
(43)
where
(44)
Proof
By definition,
(45)
Therefore,
(46)
Substitution into the prime-gap decomposition
(47)
gives (43).
This representation is exact since each angle is defined from the corresponding gap. The angle does not predict the gap. The gap defines the angle, and the triangle records the weighted contribution of that gap to the finite prime sum.
For
, the gaps are
(48)
The corresponding multiplicities are
(49)
Geometric encoding is recorded in Table 3. The final column is the contribution
, which is equal to
. The table shows that the trigonometric form reproduces the same exact arithmetic contribution as the gap formula.
Table 3. Geometric encoding for
.
|
|
|
|
|
1 |
1 |
5 |
|
5 |
2 |
2 |
4 |
|
8 |
3 |
2 |
3 |
|
6 |
4 |
4 |
2 |
2 |
8 |
5 |
2 |
1 |
2 |
2 |
The final column in Table 3 sums to
(50)
Adding the baseline term
, we obtain
(51)
This agrees with the direct sum
(52)
The geometric relation is most transparent in Figure 2. The vertical height is
, the horizontal gap is
, and the angle is chosen so that
.
The weighted contribution is therefore
, equivalently
. The gap
is encoded as a slope relative to height
, and its contribution to
is
.
Figure 2. Right-triangle representation of one weighted prime gap.
6. Asymptotic Scale and Finite versus Infinite Summation
The identity
(53)
is exact for every positive integer
. It does not by itself give a new estimate for
, but it is consistent with the known asymptotic theory of prime sums.
The prime number theorem implies
(54)
Consequently, the partial sum of the first
primes satisfies the classical leading estimate
(55)
This is a known asymptotic statement, not a consequence newly proved here.
The gap formula gives a finite way to read the same scale. Since
, the exact identity (53) expresses
through weighted forward differences of the prime sequence. As intuition only, one may think of a typical gap near
as having size comparable to
. Replacing
by
in the weighted sum suggests
(56)
This heuristic sum has leading order
(57)
The point is the weights in the finite identity have the same natural scale as the classical asymptotic estimate. The argument does not replace the prime number theorem and does not give a new proof of (55). Thus, the finite decomposition has the same dominant growth as the usual asymptotic estimate for
.
The comparison of exact values of
with the leading asymptotic scale
is plotted in Figure 3. The plotted ratio gives a numerical view of the known asymptotic relation and shows that the exact finite decomposition has the expected growth scale. The curve shows
for finite
, with the horizontal line marking the asymptotic level 1.
Figure 3. Partial prime sums relative to the leading asymptotic scale.
We now separate the finite theorem from infinite summation. The series
(58)
diverges in the ordinary sense because
(59)
Therefore,
(60)
has no finite value as an ordinary convergent series. Similarly,
(61)
diverges in the ordinary sense.
Assigning a finite value to a divergent series requires a specified regularization method. Such methods have legitimate uses in analytic continuation, spectral theory, and mathematical physics. They do not turn a divergent series into an ordinary convergent sum. For this reason, the finite identity (53) is kept separate from any regularized interpretation of infinite prime sums. Any regularized treatment of
would require its own definitions, convergence principles, and proofs. It is not part of the finite result proved in this paper.
7. Conclusions
This work gives an exact finite decomposition for the sum of the first
primes. If
denotes the
-th prime and
then the partial prime sum satisfies
which is an exact rearrangement of the partial prime sum. It does not by itself give new estimates for
, new bounds for prime gaps, or a new proof of the prime number theorem. Its contribution is structural which shows how each consecutive prime gap enters the finite sum through the weight
.
The same identity also has the geometric form
where
This form encodes each weighted gap as the slope of a right triangle. It preserves the same arithmetic information in geometric notation. The examples confirm the identity exactly for finite values of
. The asymptotic discussion shows that the decomposition is consistent with the classical scale
The finite theorem is also independent of any regularized infinite summation. The Ramanujan-inspired aspect of this work also lies in the organization of arithmetic information and partial prime sum is rewritten as a weighted history of consecutive prime gaps. Thus, the result proved here belongs fully to finite number theory.
Acknowledgements
We express our sincere respect for Srinivasa Ramanujan, whose work continues to influence how mathematicians think about arithmetic structure, partitions, summation and the order hidden inside numerical patterns.