Consider the function f:N0→N0, where N0 is the set of all non-negative integers, defined by the following conditions:
(i) f(0)=0,
(ii) f(2n)=2f(n) and
(iii) f(2n+1)=n+2f(n) for all n≥0.
(a) Determine the three sets L:={n∣f(n)<f(n+1)},E:={n∣f(n)=f(n+1)}, and G:={n∣f(n)>f(n+1)}.
(b) For each k≥0, find a formula for ak:=max{f(n):0≤n≤2k} in terms of k.