Post Closed as "off topic" by Douglas Zare, Ryan Budney, Emil Jeřábek, Henry Cohn, S. Carnahan

show/hide this revision's text 3 deleted 369 characters in body

Which has been puzzling me over the last year.

The algorithm Given a natural number $n$ define a procedure as follows:

  • Generate a list of primes upto and possibly including, $n$
  • Assign $Z = n$
  • If $Z > 0$, subtract the largest prime from list which we haven't considered yet. Otherwise, add it to $Z$. If $n$ is prime, it is assumed accounted for by the first step.
  • Repeat until all primes have been considered.

For example, take $25$. The list of primes would be $2, 3, 5, 7, 11, 13, 17, 19, 23$. Subtracting , $23$ from $Z=25$, we get $Z=2$. Next, we get $Z=2-19= -17$. And so on. Consequently, $Z$ assumes the values $25, 2, -17, 0, 13, 2, -5, 0, 3, 1$.

Note: Only an example. The conjecture as stated deals with applying the algorithms on primes. However, other numbers also seem to exhibit interesting patterns.

The Pattern

  • Beginning at $3$ and every other prime thereafter, following the algorithm always (seems to) land us at $1$.
  • For the rest of the primes, $Z$ has a final value of either $0$ or $2$.

The problem

I would like to know, for instance, what mathematical tools would be best suited to attempting a proof? Perhaps all this is simply a consequence of something more powerful, like the Goldbach conjecture?

Maybe what I'm really expecting is some ingenious proof I can't understand, or a contradiction. I feel I've beaten this idea just about dead and can't go further with my understanding of Mathematics.

Updates

Please read @alex.jordan's answer as he cleverly limits the range of values $Z$ can reach (say, terminal Z, or $Z_t$) to ${-2,-1,0,1,2}$. The missing piece to {-1,0,1,2}$. As a result, the puzzle seems problem is now reduced tobe a proof that no :

  • For any prime numbercan have , prove that $Z_t=-1$. This appears to -1$ cannot be extendable to $Z_t(n)=-1$ iff n is evena terminal.

Also being discussed: here

show/hide this revision's text 2 updated to reflex M.SE changes

Given a natural number n$n$ define a procedure as follows:

  • Generate a list of primes upto and possibly includingn, $n$
  • Assign $Z = nn$
  • If $Z is positive> 0$, subtract the largest prime from list which we haven't considered yet. Otherwise, add it to Z$Z$. If $n$ is prime, it is assumed accounted for by the first step.
  • Repeat until all primes have been 'considered'.considered.
  • For example, take 25. $25$. The list of primes would be [2 $2, 3, 5, 7, 11, 13, 17, 1923]. First prime we take is 23, 23$. Subtracting, $23$ from $Z=25$, we get Z=2. $Z=2$. Next, we get Z = 2-19 = $Z=2-19= -17. 17$. And so on.

    Consequently, Z$Z$ assumes the values [25 $25, 2, -17 17, 0, 13, 2, -5 5, 0, 31], 1$.

    The 'pattern'Pattern

  • Beginning at 3$3$ and every other prime thereafter, following the algorithm always (seems to) land us at 1.$1$.
  • For the rest of the primes, Z $Z$ has a final value of either 0$0$ or 2.
  • A trivial noteFor the primes p not classed under 3, there is a simple explanation why they can't reach 1. It would mean, the partition of the set S containing 1 and primes till p would have an even total sum. This is clearly a contradiction.$2$.

    Maybe what I'm really expecting is some ingenious proof I can't understand, or a contradiction. I feel I've beaten this idea just about dead and can't go further with my understanding of Mathematics.

    Updates

    Please read @alex.jordan's answer as he cleverly limits the range of values $Z$ can reach (say, terminal Z, or $Z_t$) to ${-2,-1,0,1,2}$. The missing piece to the puzzle seems to be a proof that no prime number can have $Z_t=-1$. This appears to be extendable to $Z_t(n)=-1$ iff n is even.

    show/hide this revision's text 1