The Thue–Morse sequence
$\{t(n)\}_{n\geqslant 0}$ is the indicator function of the parity of the number of ones in the binary expansion of nonnegative 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.272019\ldots $, the set of the numbers
$$\begin{align*}1,\quad \sum_{n\geqslant1}\frac{t(n)}{\beta^{n}},\quad \sum_{n\geqslant1}\frac{t(n^2)}{\beta^{n}},\quad \dots, \quad \sum_{n\geqslant1}\frac{t(n^k)}{\beta^{n}},\quad \dots \end{align*}$$ is linearly independent over the field
$\mathbb {Q}(\beta )$, where
$\varphi :=(1+\sqrt {5})/2$ is the golden ratio. Our result yields that for any integer
$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.