<span>Edit: Opps, I forgot that you ask about an equation. </span> <span>The sum of 1 + 2 + 3 + 4 + ... + n, where n is some integer, is: </span> <span>(First term + Last term) multiplied by (Total number of terms / 2) </span> <span>= (1 + n)(n / 2)</span>