TITLE: Is the alternating sum of primes $2 - 3 + 5 + . . P_N$ asymptotic to $- N ln N/2$ for even $N$?
QUESTION [17 upvotes]: Given that many sums over the naturals (e.g., $1^2 + 2^ 2 + \ldots$) can be extended to sums over the primes using integration and the prime number theorem, it seems natural to look at sums that would be difficult to extend.  The alternating sum $1 - 2 + 3 - 4 \ldots$ has an elementary sum; so consider the corresponding sum on the primes $2 - 3 + 5 - 7 + \ldots P_n$.  For $n$ even, this is the negative of $(3- 2) + (7-5) + (13 - 11) + \ldots$ which is the negative of the sum of half the prime gaps between $2$ and $n$. But the sum of all the prime gaps telescopes to $P_n - 2$.  Thus, heuristically a good estimate for the alternating sum appears to be $-P_n /2$ which by the prime number theorem is asymptotic to - $n \ln n/2$.  Similarly, for odd $n$, a similar estimate is $-P_n/2 + P_n = n \ln n/2$.  I coded up this estimate (actually, my code used the estimate due to Dusart of $P_n = n (\ln n + \ln \ln n - 1)$) and found errors less than 2% for $500 < n <  78, 401$ for both $n$ odd and $n$ even.
The question remains: is there a proof that the sum is asymptotic to $n \ln n /2$ for n odd and to $-n \ln n /2$ for $n$ even? 
One of the comments refers to a limit by Ruiz http://www.primepuzzles.net/puzzles/puzz_211.htm.  One of the posts there suggests that the Ruiz limit holds for prime powers as well.  I have no idea whether the Ruiz result is proved (there seems to be some doubt) but the same heuristic argument above seems to extend to alternating series on prime powers $2^k - 3^k + 5^ k + ... P_n^k$.  Again, for $n$ even this is the negative of the sum of the gaps $(3^k - 2^k) + (7^k - 5^k) + \ldots$ which is half of the sum of $(3^k - 2^k) + (5^k - 3^k) + (7^k - 5^k) + \ldots$ which telescopes to $P_n^k - 2^k$.  This suggests heuristically again that a good estimate for the alternating sum to power $k$ is  $- P_n^k/2$ for $n$ even and $P_n^k/2$ for $n$ odd.  Or in  terms of $n$, $-(n \ln n)^k/2$ for $n$ even and $(n \ln n)^k/2$ for $n$ odd.  The OEIS has a page for $k = 1$ and some conjectures but not seemingly related to the sum. There does not seem to be an entry for $k = 2$ (the partial sums $4, -5, 20, -29, \ldots$)

REPLY [20 votes]: As you remark, your quantity is governed by the sum of half of the prime gaps.  More specifically, it's the (negative of the) sum of the odd index prime gaps.  Let
$$
S(N;a,q) := \sum_{n\leq N, n\equiv a\pmod{q}} p_{n+1}-p_n.
$$
The quantity you are interested in is therefore $-S(N;1,2)$.  Is this surely asymptotic to $-p_N/2$?  Yes.  Can we prove it?  I don't see how.  However, it is possible to prove a lower bound.  This was carried out by some students, Ping Ngai Chung and Shiyu Li, that I supervised last summer.  You can view their work here: http://www.mathcs.emory.edu/~ono/REUs/archive/results/REU2013ChungLi.pdf.
They prove that 
$$
\lim\inf_{N\to\infty} \frac{S(N;a,q)}{p_N} \geq \frac{1}{16q^2},
$$
and, if we assume the Hardy-Littlewood 2-tuples conjecture, 16 can be replaced by 2.  In particular, for $S(N;1,2)$, we get an unconditional lower bound of $p_N/64$ and a conditional lower bound of $p_N/8$.  Their work also extends to any set of primes with positive density.
The basic idea of the proof is this.  Using sieve techniques (in this case, Selberg's sieve, but many sieves will provide some result), it is possible to show that the number of prime gaps $p_{n+1}-p_n$ that lie in the interval $[0,\delta \log p_n]$ is a small proportion of all gaps, provided $\delta>0$ is not too big; let's call this proportion $\alpha$.  If we're interested in providing a lower bound for $S(N;1,2)$, say, the worst that could happen is if all of these small gaps occurred at odd indices.  But then, if $\alpha<1/2$, not all odd index gaps can be this small, and so $S(N;1,2)$ has to have some positive mass.  To see the details of this idea carried out, I'll refer you to Chung and Li's paper.
I'll close by remarking that their motivating question was not to understand $S(N;a,q)$, but rather the (easily seen to be equivalent) question, how often is the prime counting function $\pi(x)$ even?  How often is it $a\pmod{q}$?