# How to find closed form of summation

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

• kindly check the first equation to see if $n^2$ is suppose to be $i^2$. – Siong Thye Goh Oct 21 '18 at 8:06
• Thanks, I fixed it – kelp99 Oct 21 '18 at 8:09

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.