We prove by induction on k that every initial segment of the sequence, a0,a1,…,ak, consists of the following elements (counted with multiplicity, and not necessarily in order), for some ℓ⩾0 with 2ℓ⩽k+1 :
0,1,…,ℓ−1,0,1,…,k−ℓ.
For k=0 we have a0=0, which is of this form. Now suppose that for k=m the elements a0,a1,…,am are 0,0,1,1,2,2,…,ℓ−1,ℓ−1,ℓ,ℓ+1,…,m−ℓ−1,m−ℓ for some ℓ with 0⩽2ℓ⩽m+1. It is given that
(a0m+1)+(a1m+1)+⋯+(amm+1)+(am+1m+1)=2m+1,
which becomes
((0m+1)+(1m+1)+⋯+(ℓ−1m+1))+((0m+1)+(1m+1)+⋯+(m−ℓm+1))+(am+1m+1)=2m+1
or, using (im+1)=(m+1−im+1), that
((0m+1)+(1m+1)+⋯+(ℓ−1m+1))+((m+1m+1)+(mm+1)+⋯+(ℓ+1m+1))+(am+1m+1)=2m+1
On the other hand, it is well known that
(0m+1)+(1m+1)+⋯+(m+1m+1)=2m+1,
and so, by subtracting, we get
(am+1m+1)=(ℓm+1).
From this, using the fact that the binomial coefficients (im+1) are increasing for i⩽2m+1 and decreasing for i⩾2m+1, we conclude that either am+1=ℓ or am+1=m+1−ℓ. In either case, a0,a1,…,am+1 is again of the claimed form, which concludes the induction.
As a result of this description, any integer N⩾0 appears as a term of the sequence ai for some 0⩽i⩽2N.