I have the pattern: 1 + 2 + 3 + 4 + 5 + 6, but I need the formula for it I'm writing some software that takes a group of users and compares each user with every other user in the group. I need to display the amount of comparisons needed for a countdown type feature. 
For example, this group [1,2,3,4,5] would be analysed like this:
1-2, 1-3, 1-4, 1-5
2-3, 2-4, 2-5
3-4, 3-5
4-5

By creating little diagrams like this I've figured out the pattern which is as follows:
Users - Comparisons
2     -   1
3     -   3 (+2)
4     -   6 (+3)
5     -   10 (+4)
6     -   15 (+5)
7     -   21 (+6)
8     -   28 (+7)
9     -   36 (+8)

I need to be able to take any number of users, and calculate how many comparisons it will take to compare every user with every other user.
Can someone please tell me what the formula for this is?

$$N=2:\ 1 + 2 = (1 + 2) = 1\times3$$
$$N=4:\ 1 + 2 + 3 + 4 = (1 + 4) + (2 + 3) = 2\times5$$
$$N=6:\ 1 + 2 + 3 + 4 + 5 + 6 = (1 + 6) + (2 + 5) + (3 + 4) = 3\times7$$
$$N=8:\ 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8= (1 + 8) + (2 + 7) + (3 + 6)+ (4 + 5) = 4\times9$$
More generally, $N/2\times(N + 1)$.
For odd $N$, sum the $N-1$ first terms (using the even formula) together with $N$, giving $(N-1)/2\times N+N=N\times(N+1)/2$.
