The answer is 50. If a0<0 then it is clear that a100>a0. If a0=0, then bn∈{0,1/2} and hence S=b1+b2+⋯+b100≤50. Assume that a0>0. In this case all terms of the sequence (an) are positive. We have
(an−2an−1)(an−2an−12)=0anda100≤a0.
This equation can be expressed as
an−1an+anan−12=2an−1+21.
Summing up the equations for n=1,2,...,100 side by side, we get
n=1∑100an−1an+n=1∑100anan−12=2n=1∑100an−1+50.
Using Cauchy-Schwarz Inequality
n=1∑100anan−12≥a1+a2+⋯+a100(a0+a1+⋯+a99)2≥a0+a2+⋯+a99=n=1∑100an−1.
This yields that
n=1∑100(an−1an−an−1)≤50.
The rule given in the problem implies that bn=an−1an−an−1 for all n=1,2,...,100. Hence S≤50.
The equality holds when ai=1/2,i=0,1,...,100,bi=1/2,i=1,2,...,100.