Ones and Twos for days
JavaScript (ES7),  25 24  23 bytes
Returns the \$n\$-th term, 1-indexed.

n=&gt;n&gt;(++n**.5|0)**2?2:1

Try it online!
How?
We have \$a(n)=2\$ iff the difference between \$n+1\$ and the previous square is greater than \$1\$:
$$n+1-\left\lfloor \sqrt{n+1}\right\rfloor^2&gt;1$$
which boils down to:
$$n&gt;\left\lfloor \sqrt{n+1}\right\rfloor^2$$