# Represent $\sum_{k=1}^{n} k^{2}$ in terms of binomial coefficient.

Came across a probability problem that is sort of challenging for a beginner in a sense that I may have not seen or came across a lot of binomial identities. What I am looking for is to see if there is any way to represent $$\sum_{k=1}^{n} k^{2}$$ in terms of binomial coefficient.

• Do you mean $\sum_{k=1}^n k^2$? – Tavish May 29 at 18:02
• @Tavish yes, sorry should've typed it up properly – Stacy May 29 at 18:22

Yes. Notice the following: $$k^2=k\cdot (k-1)+k=2\cdot \frac{k(k-1)}{2}+\binom{k}{1}=2\binom{k}{2}+\binom{k}{1}.$$ Doing this we have $$\sum _{k=1}^n\left (2\binom{k}{2}+\binom{k}{1}\right )=2\binom{n+1}{3}+\binom{n+1}{2},$$ using the Hockey-Stick identity.

Notice that this is part of a greater picture in which one can go from polynomials like $$x^k$$ to polynomials like $$\binom{x}{k}$$ as a change of basis.

• Thank you so much! This is exactly what i was looking for! – Stacy May 29 at 21:02
• @Stacy You are welcome! – Phicar May 29 at 21:13

The identity

$$\sum_{k=0}^n k^2 = 2\binom{n+1}{3} + \binom{n+1}{2}$$

given in Phicar's answer can be found by counting the following in two ways:

The number of triples of integers $$(x,y,z)$$ with $$x < z$$ and $$y < z$$ where $$x, y$$ and $$z$$ are among the integers $$0, \dots, n$$.