Question: How to derive this formula? 

$$n^2=\sum\_{k=1}^n(2k-1).$$

Answer: 
*[Notice](http://en.wikipedia.org/wiki/Square_number#Properties) how the difference of two consecutive squares is always an odd number:* $$(x+1)^2=x^2+(2x+1)$$
[![Image](https://i.stack.imgur.com/CJiZi.png)](http://betterexplained.com/articles/surprising-patterns-in-the-square-numbers-1-4-9-16/)
That depends on what you already know. One way to reduce this to a better known equality would be to use $1+3+5+7=(1+2+3+4+5+6+7)-2(1+2+3)$.