I have learned this formula before. It is connected with mathematical induction. German mathematician Gauss, when he was 7 years old, thought of this formula. His teacher told students to find the sum of numbers, starting from 1 to 100. He thought that students won't finish it in next 30 minutes, but Gauss did. n(n+1)/2 where n is the last number.

This formula can be generalised so you can start from any number you like that belongs to N:

since n(n+1)/2 is when you start from 1, we will subtract the sum that needs to be subtracted:

if you are starting from 3 you will subtract from the main formula, 1+2. So let's write it:

n(n+1)/2 - x(x+1)/2

x=number below the one you are starting from

st= starting number

n(n+1)/2 - (st-1)(st-1+1)/2= [n(n+1)-st(st-1)]/2=[n^2+n-st^2+st]/2=[(n-st)(n+st)+n+st]/2=(n+st)(n-st+1)/2 -formula that administrator has mentioned

You also have formula for:

n e N 1^2+2^2+3^2.......n^2= n(n+1)(2n+1)/6