(a) By assumption, we have vi=ui for even i and vi=−ui for odd i. Thus, the inequality can be rewritten as
(i=0∑1009u2i+i=0∑1008u2i+1)2+(i=0∑1009u2i−i=0∑1008u2i+1)2≤72a2−48a+10+420192,
which is equivalent to
(i=0∑1009u2i)2+(i=0∑1008u2i+1)2≤36a2−24a+5+420191.
Let the binary representation of a be a=∑i=1+∞2ixi where xi∈{0,1}. Since 21≤a≤32, we have x1=1.
For each natural number i, the parity of ⌊2i+1a⌋ depends on xi+1. In particular, if xi+1=0, then ⌊2i+1a⌋ is even, and if xi+1=1, then ⌊2i+1a⌋ is odd. Therefore, (−1)⌊2i+1a⌋=1 if xi+1=0, and (−1)⌊2i+1a⌋=−1 if xi+1=1. In all cases, we have
(−1)⌊2i+1a⌋=1−2xi+1.
---
Denote A=∑i=0100922i+1x2i+1 and B=∑i=0100822i+2x2i+2, we have
i=0∑1009u2i=i=0∑100922i+13(1−2x2i+1)=2−2⋅410091−6A,
i=0∑1008u2i+1=i=0∑100822i+23(1−2x2i+2)=1−410091−6B.
On the other hand, a≥A+B≥21, thus
36a2−24a+5+420191=4(3a−1)2+1+420191≥4(3A+3B−1)2+1+420191.
We prove that
(2−2⋅410091−6A)2+(1−410091−6B)2≤4(3A+3B−1)2+1+420191.
By some calculations, we can rewrite the above inequality as
410096A+12B(1+410091−6A)≤410081−420181.
Since A≥21, we have 6A>1+410091. Thus,
410096A+12B(1+410091−6A)≤410096A≤410096i=0∑100922i+11=410081−420181.
Using these inequalities, the desired result will follow.
(b) By the arguments in part (a), the equality holds if and only if a=A+B,B=0 and A=32(1−410101), which implies that
a=32(1−410101).