The diagram below shows the $1$st, $2$nd, $3$rd and $4$th triangular numbers.
(1 spot) : $1$
(3 spots) : $3$
(6 spots) : $6$
(10 spots) : $10$
The formula $n(n + 1)/2$ can be used to find the $n$th triangular number.
For example the fifth triangular number is
$5(5 + 1) / 2 = 5 \times 6 / 2 = 15$
How many of the triangular numbers that are less than $2000$ are odd?
My thought: So I can see a pattern here: $1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78 \ldots$. So after the first $3$ there is an equal number of odds and evens.
But that is a problematic way to calculate it. What is the easier way?
$\dfrac{n(n+1)}{2}<2000 \implies n^2+n-4000<0 \implies n<\dfrac{-1+\sqrt{16001}}{2}\approx62.75$
$\dfrac{n(n+1)}{2}\not\equiv0\pmod2 \implies n(n+1)\not\equiv0\pmod4$
$\implies [n\not\equiv0\pmod4]\wedge[(n+1)\not\equiv0\pmod4]$
$\implies [n\not\equiv0\pmod4]\wedge[n\not\equiv3\pmod4]$
$\implies [n\equiv1\pmod4]\vee[n\equiv2\pmod4]$
Therefore $n\in\{1,2,5,6,9,10,\dots,61,62\}$
Hence there are $\dfrac{62}{2}+1=32$ odd triangular numbers smaller than $2000$