Set bi=2ℓi, all of them are even. At the first step we get the pairs
A:={(p,q):(p,q)=(1,2ℓ1),ℓ1∈Z.(1)}.
At each subsequent step we expand the set A by adding additional pairs (p′,q′)
defined as
{(p′,q′):q′p′=2ℓ+qp1,(p,q)∈A,ℓ∈Z}(2).
By (2) we obtain
p′=q;q′=2ℓq+p(3)
So, if (p,q) is obtained in the process of expanding, we also add (p′,q′) defined as in (3). We want to characterize all pairs (p,q) that can be obtained in this way. Note that if (p,q)=1, then from (3) follows (p′,q′)=1. Let us prove that the set of pairs (p,q) in question is
A:={(p,q):p,q∈Z∖{0},∣p∣<∣q∣,(p,q)=1, one of p,q is even, the other is odd.}
Note that we ruled out ∣p∣=∣q∣ because qp=±1 cannot be represented as wanted. The transformation described in (3) shows that we cannot step outside A. To prove that all pairs in A can be generated, we follow a standard procedure - take (p′,q′)∈A and search for (p,q)∈A that generates (p′,q′) via (3), but we want (p,q) be "less" than (p′,q′). That's how induction works. Solving (3) with respect to (p,q) yields
p=q′−2ℓp′;q=p′(4)
Clearly, we can choose ℓ∈Z such that ∣q′−2ℓp′∣<∣p′∣ (since p′=0). Indeed, consider the points q′−2ℓp′ where ℓ runs through all integers. These points are at a distance 2p′ apart, and none of them hits p′ because (p′,q′)=1. Hence, the point closest to 0 has magnitude less than p′. So, we started from (p′,q′)∈A, and found (p,q)∈A that generates (p′,q′) and moreover, q=p′,∣p∣<∣p′∣<∣q′∣. Apparently (p,q) is "less" than (p′,q′), that is, ∣p∣<∣p′∣,∣q∣<∣q′∣. Now, induction does the job. Obviously, (1,2),(−1,2),(1,−2),(−1,−2) can be represented as continued fractions satisfying the statement. Assume that all (p,q)∈A with ∣p∣≤N,∣q∣≤N can be represented like that. Take (p′,q′)∈A,∣q′∣=N+1. As just shown, there exists (p,q)∈A,∣p∣<∣q∣≤N such that
q′p′=2ℓ+qp1.
The induction step is complete and the result follows. Note that it also follows that the representation of numbers in A as continued fractions like that is unique. Indeed, take a pair (p′,q′)∈A. The pair (p,q)∈A that satisfies (4) and ∣p∣<∣p′∣ is determined uniquely. Uniqueness follows easily.