Not so triangular numbers Let's consider the sequence \$S\$ consisting of one \$1\$ and one \$0\$, followed by two \$1\$'s and two \$0\$'s, and so on:
$$1,0,1,1,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,...$$
(This is A118175: Binary representation of n-th iteration of the Rule 220 elementary cellular automaton starting with a single black cell.)
Given \$n&gt;0\$, your task is to output \$a(n)\$, defined as the number of \$1\$'s among the \$T(n)\$ first terms of \$S\$, where \$T(n)\$ is the \$n\$-th triangular number.
The first few terms are:
$$1,2,3,6,9,11,15,21,24,28,36,42,46,55,65,70,78,91,99,105,...$$
One way to think of it is to count the number of \$1\$'s up to the \$n\$-th row of a triangle filled with the values of \$S\$:
1 (1)
01 (2)
100 (3)
1110 (6)
00111 (9)
100001 (11)
1111000 (15)
00111111 (21)
000000111 (24)
1111000000 (28)
01111111100 (36)
...

Rules
You may either:

take \$n\$ as input and return the \$n\$-th term, 1-indexed
take \$n\$ as input and return the \$n\$-th term, 0-indexed
take \$n\$ as input and return the \$n\$ first terms
take no input and print the sequence forever

This is a code-golf challenge.
Jelly, 9 bytes
ḤR&gt;)FŒHṪS

A monadic Link accepting \$n\$ which yields \$a(n)\$.
Try it online! Or see the test-suite.
How?
We can think of \$S\$ as being built in blocks of length \$2i\$ where each block is a string of \$i\$ ones followed by \$i\$ zeros: 10 1100 111000 ....
If we stop at \$i=x\$ and call the result \$S_x\$ we know that \$S_x\$ necessarily contains an equal number of ones and zeros.
We also know that the length of \$S_x\$ will be  \$\sum_{i=1}^{x}2i = 2 \sum_{i=1}^{x}i = 2T(x)\$.
So the value of \$a(x)\$ is the count of ones in the first half of \$S_x\$.
An alternative way to get this same result is to subtract the count of the zeros in the first half of \$S_x\$ from \$T(x)\$, and since \$S_x\$ contains an equal number of ones and zeros this must also be the count of zeros in the second half of \$S_x\$. Therefore we can form the complement of \$S_x\$ and count the ones in its second half:
ḤR&gt;)FŒHṪS - Link: integer, n
   )      - for each (i in [1..n]): e.g. i=3
Ḥ         -   double                       6
 R        -   range                        [1,2,3,4,5,6]
  &gt;       -   greater than i?              [0,0,0,1,1,1]
    F     - flatten -&gt; [0,1,0,0,1,1,0,0,0,1,1,1,...]
     ŒH   - split into two equal length parts
       Ṫ  - tail
        S - sum