sum[ n^2/(4^(i - 1))^2 ] with i from 1 to floor(log(n)) + 1