I prove below that if $n$ is odd then it can not end up in -1 as terminal value after applying your process. There are some details minor missing. Let $n$ be an integer on the range $[p_k+1,p_{k+1}]$ And define $Z_i$ ($i=k,k-1,\dots,1$) as $$ Z_i = \begin{cases} Z_{i+1}-p_i \quad &\text{if } Z_{i+1} > 0\\\\Z_{i+1}+p_i \quad &\text{if } Z_{i+1}\le 0 \end{cases}$$ the first step is to prove that $$ -p_i < Z_i \le p_i\quad\quad\quad(\*) $$ First we see that $Z_k \le p_k$, but otherwise $$ p_{k+1} > Z_{k+1} = Z_k+p_k > 2p_k $$ and this contradicts Bertrand's postulate. On the other hand $Z_k > 0 > -p_k$ trivially, so we have the inequality for $i=k$. Now if the inequality is true for $i+1$ (with $i>1$) it is also true for $i$, because we have: - if $Z_{i+1} \le 0$ then $Z_i \le p_i$ and if $Z_i \le -p_i$ then $$ -p_{i+1} + p_i < Z_{i+1} + p_i = Z_i \le -p_i $$ contradicting Bertrand's postulate. - if $Z_{i+1} > 0$ then $Z_i > -p_i$ by definition and if $Z_i > p_i$ then $$ p_i < Z_i = Z_{i+1}-p_i \le p_{i+1}-p_i $$ again contradicting Bertrand's postulate. In particular for $i=1$ we get $-2 < Z_1 \le 2$ which shows that the only possible end values are -1,0,1 and 2. We want to rule out the value $-1$ whenever $n$ is odd. By the same inequality the only possible values of $Z_2$ are $-2,-1,0,1,2,3$, and and the only one that leads to $Z_1=-1$ is $Z_2=1$, so we can asume that we start with a value of $n$ that leads to $Z_2=1$. It is also easy to see using a parity argument that if $n$ is odd and ends in $-1$ then $k$ is even say $p_{2k+1} > n \ge p_{2k}$ The second step we consider the two sequences \begin{align} W_i &= \{-1, 1, -2, 3, -4, 7, -6, 11, -8, \dots \} \quad \text{and} \\\\ Y_i &= \{-1, 1, 4, -1, 6, -5, 8, -9, 12, \dots \} \end{align} where the $i$th term comes from the preceding adding or substracting the $(i-1)$th prime ie $$ W_1 = -1, W_2 = 1, W_{2i+1} = W_{2i}-p_{2i}, W_{2i} = W_{2i-1}+p_{2i-1} $$ and $$ Y_1 = -1, Y_2 = 1, Y_{2i+1} = Y_{2i}+p_{2i}, Y_{2i} = Y_{2i-1}-p_{2i-1} $$ it is easy to verify that both series alternate positive and negative values after the third term and that $\lvert W_i \rvert \ge i$ and $\lvert Y_i\rvert \ge i$ for $i\ge 11$. We are going to prove that if $Z_i$ is a sequence with terminal value -1, then for all $i$ $$ Y_{2i} \le Z_{2i} \le W_{2i} \quad \text{and} \quad Z_{2i+1} \le W_{2i+1}\text{ or } Y_{2i+1} \le Z_{2i+1} \quad\quad\quad (\*\*)$$ We need first a simple (and nice:) bound on prime gaps: _For all $n$ we have_ $$ p_{n+1}-p_n \le n $$ to prove it, it is enough to combine the inequalities of Dusart and of Miller-Robin inequalities for the $n$-the prime (see [here][url01] for the references) say $$ p_n > n(\log n + \log \log n -1 ) \quad \text{for all } n $$ and $$ p_n < n(\log n + \log \log n -1 +1.8\log \log n/\log n) \quad \text{if } n > 13 $$ and check by hand the small cases. (I suppose there are proofs of this fact that don't use the prime number theorem at all). Now suppose that for a given $n$ with terminal value $-1$, some $Z_i$ doesn't verify either of the inequalities $(\*\*)$, let's take the least such $i$, if $i=2t$ is odd this means that $$ W_{2t+1} < Z_{2t+1} < Y_{2t+1} $$ but then if $Z_i>0$, then as $Z_i$ is even then $$ Z_{2t} = Z_{2t+1}-p_{2t} < Y_{2t+1}-p_{2t} = Y_{2t} $$ and if $Z_t \le 0$ then $$ Z_{2t} = Z_{2t+1}+p_{2t} > W_{2t+1} + p_{2t} = W_{2t} $$ in either case it contradicts that $i$ is least. So we can assume that $i$ is even say $2t$. Bt then again this implies that $Z_{2t} < Y_{2t}$ or that $Z_{2t} > W_{2t}$, in the first case by the minimallity of $i$ we have either $$ Z_{2t-1} \le W_{2t-1} \quad \text{or}\quad Z_{2t-1} \ge Y_{2t-1} \quad\quad (\*\*\*)$$ the second case is clearly impossible as $Z_{2t} < Y_{2t}$, for the first case we would have using (\*): $$ -p_{2t} + p_{2t-1} < Z_{2t}+p_{2t-1} \le W_{2t-1} $$ but this implies that $p_{2t}-p_{2t-1} > W_{2t-1} \ge 2t-1$, a contradiction for $2t-1\ge 11$. Identically if $Z_{2t} > W_{2t}$ then again using $(\*\*\*)$ we see that $Z_{2t-1} \ge Y_{2t-1}$ and $$ 2t-1 \le Y_{2t-1} \le Z_{2t} + p_{2t-1} < p_{2t}+p_{2t-1} $$ again a contradiction if $2t-1\ge 11$. We are left a few number of cases that can be ruled out by checking them by hand (going back from -1 and seeing what are the possible chains that end up at -1 for the first few primes.) Finally, if some $n$ odd ends up in $-1$, then as we stated before $$ p_{2k+1} > n \ge p_{2k}$$ and then $$ n=Z_{2k}\ge p_{2k} > W_{2k} $$ contradicting $(\*\*)$. [url01]: http://primes.utm.edu/howmany.shtml