How do you find the closed form of this summation?
$$\sum_{i=0}^{\log_4 n-1} i^2 $$
I know the following: $$\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$$
How can I use this to find the closed form of my summation? Thanks
How do you find the closed form of this summation?
$$\sum_{i=0}^{\log_4 n-1} i^2 $$
I know the following: $$\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$$
How can I use this to find the closed form of my summation? Thanks
Guide:
Assuming $n$ is a power of $4$.
$$\sum_{i=0}^{\log_4 n-1} i^2 = \sum_{i=1}^{\log_4 n-1} i^2$$
Now, you can use the fomula that you listed in your question. Just replace $n$ in the formula by the relevant expression.