Consider the following question asked in my analysis quiz.
Consider $O(\log n)$, where $n = x/2,\dots,x/2^A$, where $A= [\log x /\log 2] , [ \cdot]$ is greatest integer function, then prove that summing $O(\log n)$ at $n= x/2,\dots, x/2^A$ equals $O((\log x)^2) $.
Attempt: I proved it equal to $O(\log (x/2)) + O(\log(x/4)) +\dots+O(\log(x/2^A) $ =$ O(\log x^A)= O(\log(x))$,
which is not equal to what is to be proved. So, can you please guide me how to prove it.