Originally posted by Diapason
First, notice that because n is an integer, exactly one of n and (n+1) will be even and the other will be odd.
To get an answer to n(n+1)/2 that is _odd_ then we need either n or (n+1) to be a multiple of 2 that is _not_ a multiple of 4.
To get an answer to n(n+1)/2 that is _even_ then we need either n or (n+1) to be a multiple of 2 that _is_ a mult ...[text shortened]... of these is (n+1) will, when n is incremented by 1, become n the next time.
Does this help?
more to the point, n(n+1)/2 is a well known representation for "the sum of the first n integers." i.e., 1+2+3+...+n = n(n+1)/2. these numbers expressible as n(n+1)/2 are called "triangular numbers" and have been well loved since ancient greece.
the pattern is a recursive one: to get from any one triangular number to the next, you add the next largest number. and the first number, 1, is odd. now to find the next triangular numbers we alternate adding even and odd numbers (because the counting numbers themselves alternate even and odd): the first term is  then [(1)+2] then [(1+2)+3] then [(1+2+3)+4], etc.
but if the first term (i'll label it T1) is odd, then T2 = T1 + 2 = odd + even = odd. then T3 = T2 + 3 = odd + odd = even. and T4 = T3 + 4 = even + even = even. and lastly after: T5 = T4 + 5 = even + odd = odd, the pattern repeats itself.
note that this is an interesting fact, and is the reason the sequence [1,3,6,10,15,21,...] alternates odd-odd-even-even, but the other posters were in the right about cosine's taylor expansion having more to do with the alternating sequence of derivatives in which sine/cosine are wrapped up. hope this helped!
EDIT: i just reread your original post, and see that actually your question came from the interesting pattern you saw in a taylor expansion, but was not a taylor expansion question! so i think this response might be exactly what you were looking for, and yes this is a number theory problem. it can be answered by this method i showed, or a similar one in modular arithmetic. p.s. if you need to see the proof that n(n+1)/2 = 1+2+3+...+n let me know! there are a number of nice methods to show this is true.