The general form of the example given is 1+3+5++(2n-1)++5+3+1=(n-1 )2 + n2

, for n=1001: 1+3+5++1999+2001+1999++5+3+1= 10002 + 10012 =2002001