(x(x+1))/2 -1 code example Example: x=x+1 #All mathmations' worst nighmare, but a programmers best friend.