Let varvec{F}_q be the finite field of q elements, where q=p^r is a power of the prime p, and left( beta _1, beta _2, dots , beta _r right) be an ordered basis of varvec{F}_q over varvec{F}_p. For ξ=∑i=1rxiβi,xi∈Fp,\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} \\xi =\\sum _{i=1}^rx_i\\beta _i, \\quad x_i\\in \\varvec{F}_p, \\end{aligned}$$\\end{document}we define the Thue–Morse or sum-of-digits function T(xi ) on varvec{F}_q by T(ξ)=∑i=1rxi.\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} T(\\xi )=\\sum _{i=1}^{r}x_i. \\end{aligned}$$\\end{document}For a given pattern length s with 1le sle q, a vector varvec{alpha }=(alpha _1,ldots ,alpha _s)in varvec{F}_q^s with different coordinates alpha _{j_1}not = alpha _{j_2}, 1le j_1<j_2le s, a polynomial f(X)in varvec{F}_q[X] of degree d and a vector mathbf{c} =(c_1,ldots ,c_s)in varvec{F}_p^s we put T(c,α,f)={ξ∈Fq:T(f(ξ+αi))=ci,i=1,…,s}.\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} \\mathcal{T}(\\mathbf{c} ,\\varvec{\\alpha },f)=\\{\\xi \\in \\varvec{F}_q : T(f(\\xi +\\alpha _i))=c_i,~i=1,\\ldots ,s\\}. \\end{aligned}$$\\end{document}In this paper we will see that under some natural conditions, the size of mathcal{T}(mathbf{c} ,varvec{alpha },f) is asymptotically the same for all mathbf{c} and varvec{alpha } in both cases, prightarrow infty and rrightarrow infty , respectively. More precisely, we have |T(c,α,f)|-pr-s≤(d-1)q1/2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\begin{aligned} \\left||\\mathcal{T}(\\mathbf{c} , \\varvec{\\alpha }, f) |- p^{r-s} \\right|\\le (d-1)q^{1/2} \\end{aligned}$$\\end{document}under certain conditions on d, q and s. For monomials of large degree we improve this bound as well as we find conditions on d, q and s for which this bound is not true. In particular, if 1le d<p we have the dichotomy that the bound is valid if sle d and for sge d+1 there are vectors mathbf{c} and varvec{alpha } with mathcal{T}(mathbf{c} ,varvec{alpha },f)=emptyset so that the bound fails for sufficiently large r. The case s=1 was studied before by Dartyge and Sárközy.