For how many integers $n$ where $2 \le n \le 100$ is $\binom{n}{2}$ odd?

For how many integers $n$ where $2 \le n \le 100$ is $\binom{n}{2}$ odd?

I'm finding lots of odd results, but no pattern yet. Any hints are greatlyappreciated.


Let's write explicitly: $\binom{n}{2} = \frac{n(n-1)}{2}$ and that is odd exactly if $4$ does not divide neither $n$, $n-1$ (obviously it doesn't divide both and neither does $2$). Which means $n\equiv 3$ or $2$ (mod $4$). Now count.


Hint: draw Pascal's triangle mod 2:

1
1 1
1 0 1
1 1 1 1
1 0 0 0 1
1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 1 1
1 0 1 0 0 0 0 0 1 0 1
1 1 1 1 0 0 0 0 1 1 1 1

etc.