  The Thue--Morse sequence $\{t(n)\}_{n\geqslant 1}$ is the indicator function
of the parity of the number of ones in the binary expansion of positive
integers $n$, where $t(n)=1$ (resp. $=0$) if the binary expansion of $n$ has an
odd (resp. even) number of ones. In this paper, we generalize a recent result
of E.~Miyanohara by showing that, for a fixed Pisot or Salem number
$\beta>\sqrt{\varphi}=1.272019649\ldots$, the set of the numbers $$ 1,\quad
\sum_{n\geqslant 1}\frac{t(n)}{\beta^{n}},\quad \sum_{n\geqslant
1}\frac{t(n^2)}{\beta^{n}},\quad \dots, \quad \sum_{n\geqslant
1}\frac{t(n^k)}{\beta^{n}},\quad \dots $$ is linearly independent over the
field $\mathbb{Q}(\beta)$, where $\varphi:=(1+\sqrt{5})/2$ is the golden ratio.
Our result implies that for any $k\geqslant 1$ and for any
$a_1,a_2,\ldots,a_k\in\mathbb{Q}(\beta)$, not all zero, the sequence
\{$a_1t(n)+a_2t(n^2)+\cdots+a_kt(n^k)\}_{n\geqslant 1}$ cannot be eventually
periodic.
