3 + 6 + 9 + 12 + ... + 999
= 3(1 + 2 + 3 + 4 + ... + 333)
= 3(Summation of r from 1 to 333)
= 3((1 + 333)(333/2))
= 3(334)(333/2)
= 3(167)(333)
= 166833
Edit: Opps, I forgot that you ask about an equation.
The sum of 1 + 2 + 3 + 4 + ... + n, where n is some integer, is:
(First term + Last term) multiplied by (Total number of terms / 2)
= (1 + n)(n / 2)