Solution:
As in the first solution, we show that A(0):={a∈N0∣∃0≤b≤a:(a,b) good}={a0,a1,…} (with a0<a1<…) is infinite. Furthermore, we note that if (a,b) and (a′,b′) are good and additionally a=a′ or b=b′ or a−b=a′−b′, then (a,b)=(a′,b′). This leads to the fact that for each ak∈A(0) there is exactly one bk∈N0 such that (ak,bk) is good; by definition of A(0), ak≥bk. Furthermore, if we set B(0):={b0,b1,…}, then A(0)∩B(0)={0}, since if ak=bl with k,l>0, the pairs (al,ak) and (bk,ak) are good, but also bk<ak=bl<al, contradiction. Now we show by strong induction that for all k≥1 the following holds:
(i) {0,1,…,bk}⊂{a0,…,ak}∪{b0,…,bk}
(ii) ak−bk=k
(iii)
(ak,bk)={(ak−1,bk−1)+(2,1)(ak−1,bk−1)+(3,2)if bk−1+1∈/{a0,…,ak−1}otherwise
The statement holds for k=1 and k=2, so assume it holds for all i≤k with k≥2. Suppose there is a good pair (ak+1,b), then by (i) of the induction hypothesis b>bk, since all values up to bk already appear in a good pair with a smaller other pile. But then ak+1−n≤k, which is a contradiction, since this difference is already occupied by a smaller good pair, by (ii) of the induction hypothesis. Now we distinguish cases.
Case 1: bk+1∈/{a0,…,ak}
We show that (ak+2,bk+1) is good, and thus (ak+1,bk+1)=(ak,bk)+(2,1). Indeed, all (ak+2,bk+1−m) are bad, since by (i) bk+1−m already appears in a good pair with a smaller other pile, (ak+2−m,bk+1−m) is bad since m=1 is not possible by the above argument, and if for m≥2 the pair (ak+2−m,bk+1−m) were good, we would necessarily have (ak+2−m,bk+1−m)=(al,bl) for some l≤k, which is not possible since k+1=(ak+2−m)−(bk+1−m)=al−bl=l. Finally, (ak+2−m,bk+1) is also bad, since again m=1 is not possible, and if (ak+2−m,bk+1) is good for m≥2, then bk+1 cannot be the smaller pile since it could then have at most bk stones. But since bk+1≤bk+k=ak, it follows that bk+1∈{a0,…,ak}, which contradicts our assumption.
Case 2: bk+1∈{a0,…,ak}
We first show that ak+1≥ak+3. Suppose there is a good pair (ak+2,b). Since all values up to bk already appear in a good pair with a strictly smaller other pile, b>bk must hold. Since by assumption bk+1∈{a0,…,ak}, b=bk+1 is also not possible. Thus ak+2−b≤ak+2−(bk+2)=k, which is again a contradiction, since this difference is already occupied by a smaller good pair. Now we show that (ak+3,bk+2) is good and thus (ak+1,bk+1)=(ak,bk)+(3,2). Indeed, (ak+3,bk+2−m) is bad since all values up to bk+1 already appear in a smaller good pair, (ak+3−m,bk+2−m) is bad since m=1 and m=2 were already excluded at the beginning of this case and at the beginning of the induction, and if (ak+3−m,bk+2−m) is good with m≥3, then necessarily (ak+3−m,bk+2−m)=(al,bl) for some l≤k, which is a contradiction since k+1=(ak+3−m)−(bk+2−m)=al−bl=l. Finally, (ak+3−m,bk+2) is also bad, since m=1 and m=2 were already excluded, and if (ak+3−m,bk+2) is good with m≥3, then bk+2 must be the larger pile, since otherwise it could have at most bk stones. Thus, since bk+2≤bk+k≤ak, bk+2∈{a0,…,ak}, which contradicts our assumption bk+1∈{a0,…,ak}, since by (iii) of the induction hypothesis the difference between two values from {a0,…,ak} cannot be 1. Thus, we have proved (iii) for k+1, from which (i) and (ii) follow directly. Additionally, from (i) it follows that N0=A(0)∪B(0). Calculating the first few values of the sequences (ak) and (bk), one conjectures that the following, somewhat more illustrative recursion formula holds:
(ak,bk)={(ak−1,bk−1)+(2,1)(ak−1,bk−1)+(3,2)if k−1∈{a0,…,ak−1}otherwise
To show this, we need the following intermediate result, which we prove by induction for all k≥1: apparently bbk+1=ak and bbk+1=ak+1. The two equations hold for k=1, so assume they hold for some k≥1. We make the same case distinction as before.
Case 1: bk+1∈/{a0,…,ak}
We have bk+1=bk+1 and thus bbk+1+1=bbk+1+1=ak+1+1=ak+1 by our induction hypothesis. Since in particular bbk+1+1∈{a0,…,abk+1}, it follows from our already proven recursion formula that bbk+1+1=bbk+2=bbk+1+2=ak+3=ak+1+1.
Case 2: bk+1∈{a0,…,ak}
In this case, bk+1=bk+2 and ak+1=ak+3. By the induction hypothesis, bbk+1+1=ak+2<ak+1, and thus bbk+1+1∈/{a0,…,abk+1}. It follows that bbk+1+1=bbk+2+1=bbk+1+1+1=ak+1+1+1=ak+1. Since in particular bbk+2+1∈{a0,…,abk+2}, we also get bbk+1+1=bbk+3=bbk+2+2=ak+1+1. Thus, the two equations are proved.
Now we can show the following equivalence: bk+1∈{a0,…,ak}⟺k∈/{a0,…,ak}. For if bk+1=al then l≥1 and thus bk+1=al=bbl+1 and thus bk=bbl⟹k=bl⟹k∈/{a0,…,ak}. And if k∈/{a0,…,ak}, then there is l≥1 with k=bl and thus bk+1=bbl+1=al∈{a0,…,ak}. This equivalence leads directly to the more illustrative recursion formula. Now, if we define sk=∣{l≥0∣al<k}∣, it follows that ak=3(k−sk)+2sk=3k−sk. Finally, we come to the actual proof.
Suppose there is a K such that (mk)k≥K is periodic with period c≥1. Set A:=aK+c−aK, then from periodicity it follows that ak+c−ak=A for all k≥K. We also note that if k≥aK, then ∣{l≥0∣k≤al<k+A}∣=c, so sk+A=sk+c for all k≥aK. Now let k≥max{K,aK}, then we get
ak+A2=ak+cA=3(k+cA)−sk+cA=3(k+cA)−sk−c2
and thus
A2−3cA+c2=3k−ak−sk=0
From this, we finally obtain that cA∈{φ−2,φ2}, where φ is the golden ratio. This is a contradiction, since φ−2 and φ2 are irrational.