How to solve $\binom{n}{1}^2+2\binom{n}{2}^2 + 3\binom{n}{3}^2 + 4\binom{n}{4}^2+\cdots + n\binom{n}{n}^2$? I have tried something to solve the series
$$\binom{n}{1}^2+2\binom{n}{2}^2 + 3\binom{n}{3}^2 + 4\binom{n}{4}^2+\cdots + n\binom{n}{n}^2.$$
My approach is :
$$(1+x)^n=\binom{n}{0} + \binom{n}{1}x + \binom{n}{2}x^2 + \cdots + \binom{n}{n}x^n.$$
Differentiating the above equation
$$n(1+x)^{n-1} = \binom{n}{1} + \binom{n}{2}x + \cdots + n\binom{n}{n}x^{n-1}$$
Also,
$$
\left(1+\frac{1}{x}\right)^n =\binom{n}{0} + \binom{n}{1}\frac{1}{x} + \binom{n}{2}\left(\frac{1}{x}\right)^2 + \cdots + \binom{n}{n}\left(\frac{1}{x}\right)^n$$
Multiplying above two equation I get,
$$\begin{align*}
&{n(1+x)^{n-1}\left(1 + \frac{1}{x}\right)^n}\\
&\quad= \left(
\binom{n}{1}^2 + 2\binom{n}{2}^2 + 3\binom{n}{3}^2 + 4\binom{n}{4}^2 + \cdots + n\binom{n}{n}^2\right)\left(\frac{1}{x}\right) + \text{other terms}
\end{align*}$$
So I can say that coefficient of $\frac{1}{x}$ in expansion of $n(1+x)^{n-1}(1+\frac{1}{x})^n$ will give me the required answer.
Am I doing it correct,please correct me if I'm wrong ?
If I'm right,please tell me how to calculate the coefficient of $\frac{1}{x}$ ?
Based on the answers,I tried to implement the things in a C++ code.
I tried implementing the code using extended euclidean algorithm so that the problem of truncated division can be eliminated but still not abled to figure out why am I getting wrong answer for n>=3. This is my updated code : http://pastebin.com/imS6rdWs I'll be thankful if anyone can help me to figure out what's wrong with this code.
Thanks.
Solution:
Finally abled to solve the problem.Thanks to all those people who spent their precious time for my problem.Thanks a lot.This is my updated code :
http://pastebin.com/WQ9LRy6F 

First we address the overflow issue. Note that $10^9+7$ is relatively prime to all the numbers that come up in a naive calculation of $\binom{2n}{n}$. Indeed $10^9+7$ happens to be prime. So when we are calculating, we can always reduce modulo $10^9+7$ as often as necessary to prevent overflow. 
Now to the identity. We have $n$ boys and $n$ girls. We want to choose $n$ people. The number of ways this can be done is $\binom{2n}{n}$. But we can choose $0$ boys and $n$ girls, or $1$ boy and $n-1$ girls, and so on. We can choose $k$ boys and $n-k$ girls in $\binom{n}{k}\binom{n}{n-k}$ ways, or equivalently in $\binom{n}{k}^2$ ways. This gives the standard derivation of the identity 
$$\binom{2n}{n}=\sum_{k=0}^n \binom{n}{k}^2.$$
Note now that the $\binom{2n}{n}$ choices are all equally likely. The expected number of boys is, by symmetry, equal to $\frac{n}{2}.$  But the probability that there are $k$ boys is $\frac{\binom{n}{k}^2}{\binom{2n}{n}}$, and therefore the expected number of boys is
$$\sum_{k=0}^n k\frac{\binom{n}{k}^2}{\binom{2n}{n}}.$$
The term corresponding to $k=0$ is $0$, so can be omitted, and we get
$$\sum_{k=1}^n k\frac{\binom{n}{k}^2}{\binom{2n}{n}}=\frac{n}{2},$$
which is essentially our identity.
Remark: There is a very nice book on bijective proofs called Proofs that Really Count. A title that so far doesn't seem to have been used is Mean Proofs.
