First, we'll prove that for any relatively prime a and b, there exists some n such that x(n) = a and x(n+1) = b. We'll do so by induction on a+b.
If a+b = 2 then a = b = 1 = x(0) = x(1).
Suppose a+b = k and a > b. Also suppose b = x(n+1), a-b = x(n).
Thus x(2n+2) = a, x(2n+2+1) = b
Now do the same for b > a. This proves that every rational appears in the sequence. This does not guarantee, for example, that 2/4 doesn't show up, because we haven't shown that every pair x(n), x(n+1) is a pair of coprimes.
Next we show that gcd(x(2n+1), x(2n+2)) = 1 for all n. This is true when n = 0. Now suppose it's true for all k such that 0=<k<=n for some n. By the definition of x, x(2n+3) and x(2n+4) only share a factor if x(n+1) and x(n+2) do. Our induction hypothesis is that x(2k+1) and x(2k+2) are coprime for all k in [0,n], so x(2(n/2) + 1) and x(2(n/2)+2) are coprime, and thus x(2n+3) and x(2n+4) are.
Now we know that all positive rationals appear in this sequence and that they are all in lowest terms. To show it's a bijection, we just need to show that if x(n) = x(m) then x(n+1) \= x(m+1) unless m = n. Suppose the opposite. Then x(m)x(n+1) = x(n)x(m+1). Since x(n+1) and x(n) are coprime, an since LHS and RHS must have the same prime factorization, we must have x(m) = x(n) and x(m+1) = x(n+1).
Thus the sequence contains every rational number exactly once, and every integer clearly generates a rational, so it's a bijection.
That doesn't really explain how it works so much as that it works 😳.
I thought of it like this, which is sort of equivalent to my simple Twenty Questions strategy (the one that bbarr played with like a degrading fascist wolf 😉):
Just picture a graph which branches in two directions, with 1 at the top and m/(n+m) and (m+n)/m coming out of m/n.
I spent a great deal of time on your ''spiral/zigzag'' idea, but I couldn't make an explicit function.