Find similar results for $\theta=\sqrt{m}$, and other algebraic numbers.

SOLVED

Define a sequence by $a_1=1$ and
\[a_{n+1}=\lfloor\sqrt{2}(a_n+1/2)\rfloor\]
for $n\geq 1$. The difference $a_{2n+1}-2a_{2n-1}$ is the $n$th digit in the binary expansion of $\sqrt{2}$.

Find similar results for $\theta=\sqrt{m}$, and other algebraic numbers.