Arithmetic properties of coefficients of power series expansion of $\prod_{n=0}^{\infty}\left(1-x^{2^{n}}\right)^{t}$ (with an Appendix by Andrzej Schinzel)

Let $F(x)=\prod_{n=0}^{\infty}(1-x^{2^{n}})$ be the generating function for the Prouhet-Thue-Morse sequence $((-1)^{s_{2}(n)})_{n\in\N}$. In this paper we initiate the study of the arithmetic properties of coefficients of the power series expansions of the function $$ F_{t}(x)=F(x)^{t}=\sum_{n=0}^{\infty}f_{n}(t)x^{n}. $$ For $t\in\N_{+}$ the sequence $(f_{n}(t))_{n\in\N}$ is the Cauchy convolution of $t$ copies of the Prouhet-Thue-Morse sequence. For $t\in\Z_{<0}$ the $n$-th term of the sequence $(f_{n}(t))_{n\in\N}$ counts the number of representations of the number $n$ as a sum of powers of 2 where each summand can have one among $-t$ colors. Among other things, we present a characterization of the solutions of the equations $f_{n}(2^k)=0$, where $k\in\N$, and $f_{n}(3)=0$. Next, we present the exact value of the 2-adic valuation of the number $f_{n}(1-2^{m})$ - a result which generalizes the well known expression concerning the 2-adic valuation of the values of the binary partition function introduced by Euler and studied by Churchhouse and others.


Introduction
Let n ∈ N and by s 2 (n) denote the sum of (binary) digits function of n, i.e., if n = m k=0 ε k 2 k with ε k ∈ {0, 1}, is the unique expansion of n in base 2 then s 2 (n) = m k=0 ε k . Next, let us define the Prouhet-Thue-Morse sequence (the PTM sequence for short) on the alphabet {−1, +1} as t = (t n ) n∈N , where t n = (−1) s2(n) . The sequence t satisfies the following recurrence relations: t 0 = 1 and t 2n = t n , t 2n+1 = −t n for n ∈ N. The PTM sequence has many remarkable properties and found applications in combinatorics on words, analysis on manifolds, number theory and even physics [2]. One of the striking properties of the sequence t is the simple shape of the generating function F (x) = ∞ n=0 t n x n ∈ Z [[x]]. Indeed, from the recurrence relations we easily deduce the functional equation F (x) = (1 − x)F (x 2 ) and in consequence the identity The sequence b = (b n ) n∈N of coefficients of the related power series has also a strong combinatorial property. Indeed, the number b n counts the number of representations of a non-negative integer n in the form where k ∈ N and ε i ∈ N. One can easily prove that the sequence b satisfies: b 0 = b 1 = 1 and b 2n = b 2n−1 + b n , b 2n+1 = b 2n for n ≥ 1. The above sequence is called the sequence of the binary partition function. It was introduced by Euler and was studied by Churchhouse [6] (one can also consult the papers [13,4,11]). From the discussion above we see that both t and b are sequences of coefficients of the power series expansion of F t (x) = F (x) t for t = 1 and t = −1, respectively. It is quite natural to ask: what can be proved about sequences of coefficients of F t (x) for other integer values of t? This question was our main motivation for writing this paper.
Let t be a variable and consider the sequence f (t) = (f n (t)) n∈N of coefficients of the power series expansion of the function F t (x) = F (x) t , i.e., From the definition of f (t) we see that for any given t ∈ Z the sequence f (t) is a sequence of integers. In the sequel we will study three closely related sequences. More precisely, in Section 2 we present some properties of the sequence f (t) treated as a sequence of polynomials with rational coefficients. This is only a prelude to our research devoted to the values of the polynomials f n at integer arguments. Section 3 is devoted to the study of the sequence where m ∈ N + is fixed and t m (n) = f n (m), i.e., t m (n) is just the value of the polynomial f n at t = m. We prove several properties of the sequence t m for certain values of m. In particular, in Theorem 3.3 we characterize the 2-adic valuation of the sequence t m for m being a power of 2 and m = 3. In the second part of this section we concentrate on the study of arithmetic properties of the sequence t m for m = 2 and m = 3. It is a simple observation that the sequence t 2 is closely related to the values of the Stern polynomials at −2. Moreover, we prove that the set of values of t 2 is just Z\{0}, which is the statement of Theorem 3.17 and that our sequence is log-concave, i.e., for each n ∈ N + we have t 2 (n) 2 > t 2 (n − 1)t 2 (n + 1) (Theorem 14). We also characterize the set of those n ∈ N + such that t 3 (n) = 0 (Theorem 3.13). This allows us to prove that there are infinitely many values of n such that the polynomial f n (t)/t is reducible (Corollary 3.14). Section 4 is devoted to the study of the sequence b m = (b m (n)) n∈N , where m ∈ N + is fixed and b m (n) = f n (−m), i.e., b m (n) is just the value of the polynomial f n at t = −m. The sequence b m has a natural combinatorial interpretation. More precisely, the number b m (n) counts the number of representations where ε i ∈ N for i ∈ {0, ..., k} and each ε i can have one among m colors. We present several results concerning this family of sequences. In particular, we study the 2-adic valuation of b m (n) and give a precise expression for ν 2 (b 2 k −1 (n)), which allows us to deduce that the congruence b 2 k −1 (n) ≡ 0 (mod 16) is impossible (Theorem 4.6). We also study more closely the family of polynomials (h i,k,m (x)), with k ∈ N, 0 ≤ i < 2 k , m ∈ N + , which appear in the computation of the expression for the generating function The obtained results allow us to prove several congruences of various types for certain sequences b m (Theorem 4.10, Theorem 4.13). We also prove that for fixed k ∈ N and 0 ≤ i < 2 k the sequence (h i,k,m (x)) m∈N is a linear recurrence sequence of order ≤ 2 k (Theorem 4.18). In Section 5 we present some other results, questions and conjectures concerning sequences t m and b m for various values of m ∈ N + . We hope that the problems stated in this section will stimulate further research in the area.
Finally, in the Appendix, written by A. Schinzel, the proof of Conjecture 3.18 from Section 3 is presented together with other material concerning non-vanishing of t m (n).

Arithmetic properties of the coefficients of F t (x)
We start with the computation of a recurrence relation satisfied by the sequence f (t) = (f n (t)) n∈N and then introduce a related family of polynomials which will the main object of our study in this section. Let us put During this paper we will treat all the power series formally, without considering their region of convergence. The function F (t, x) satisfies the following functional equation This functional equation allows us to find a pair of recurrence relations satisfied by the the sequence f (t).
We start with the following simple Lemma 2.1. We have the following identity where ν 2 (n) is the 2-adic valuation of the integer n and Proof. We use the expansion of the function log(1 − x) to obtain Remark 2.2. Using exactly the same type of reasoning, one can prove the following identity where ϕ k (n) is the highest power of k which divides n.
As an application of the above lemma we get the following recurrence relation for the sequence f (t). Lemma 2.3. Let F t (x) = ∞ n=0 f n (t)x n . Then f 0 (t) = 1 and for n ≥ 1 we have Proof. We have the identity log F t (x) = t log F (x). Taking derivative of both sides with respect to x and using the expansion (1), we get Multiplying both sides by F t (x) = ∞ n=0 f n (t)x n and replacing n by n + 1 in the sum on the right side and in Comparing now the coefficients on both sides of the above equality and replacing n by n − 1, we get the identity from the statement of our lemma.
Using other functional equations satisfied by F t (x), we can deduce other recurrence relations.
Lemma 2.4. The sequence f (t) satisfies the following recurrence relations: (1) f 0 (t) = 1 and where χ 2 (n) = (1 + (−1) n )/2; (2) f 0 (t) = 1 and Proof. In order to prove the first recurrence relation for the sequence f (t) we rewrite the functional equation for the function F t (x) in the following form: However, and thus comparing the coefficients near x n in the identity F t ( and performing simple manipulations we get the first recurrence relation for the sequence f (t).
In order to prove the second recurrence relation we compute Comparing now the coefficients on both sides of the above identity, we get the second recurrence relation from the statement of our lemma. Lemma 2.3 and Lemma 2.4 show us that if we fix n ∈ N, then the expression f n (t) is a polynomial with respect to t. The first terms of the sequence (f n (t)) n∈N are: As a consequence of the recurrence relation for f (t), we get the following properties of the sequence f (t).
Proof. The first and the second statement follow immediately from Lemma 2.3. In order to prove the third statement we use Lemma 2.3 one more time. For n ≥ 1 we have the following equalities: By comparing the coefficients of the polynomial f n (t) and the polynomial given by the last expression, we get the result (after the change of variables i → i + 1).
Using simple induction and the identity a(0, 0) = 1, we get the expression for a(n, n). Next, we have a(1, 2) = −3/2 and for n ≥ 2 by (3) with i = n − 2 we get Using now simple induction, we easily get the expression for a(n − 1, n) presented in the statement of our lemma. Because exactly the same technique as used for the proof of expressions for a(n, n) and a(n−1, n) can be applied in order to compute a(n − 2, n), we omit the proof and leave the simple details for the reader.
Finally, in order to get the addition formula we notice that it is a simple consequence of the formal identity F t1 (x)F t2 (x) = F t1+t2 (x).
Remark 2.6. Although we were unable to find the general formula for the coefficients a(n − k, n) for all k ≥ 4 and n ≥ k + 1, it is an easy (but tedious) exercise to prove that for fixed k we have Using this observation one can compute polynomials W k (n) for several values of k: W 3 (n) = 45(9n 2 − 73n + 176), We introduce the family of polynomials g(t) = (g n (t)) n∈N , where g n (t) = n!f n (t).
As a consequence of the recurrence relation for f (t), we get the recurrence relation satisfied by the sequence g(t) in the following form: In particular g n (t) ∈ Z[t] for each n ∈ N.
We have the following result concerning the factorization of g n (t) modulo p, where p is a prime number.
Proof. Let p be a prime number. We proceed by induction on n. Our factorization is clearly true for n ≤ p − 1. If n = p then p | g p (j) for any j ∈ Z. Since g p (t) ∈ Z[t], deg g p (t) = p and the leading coefficient of g p (t) is (−1) p , we thus have Let us consider the case n = pm + i for some i ∈ {1, . . . , p}. Observe that We have the following chain of congruences modp for i ∈ {1, . . . , p − 1}: If i = p then in the same way we obtain (mod p).
Our result follows.
3. Arithmetic properties of the sequence (f n (t)) n∈N with t ∈ N + In this section we consider the sequence (f n (t)) n∈N with a fixed positive integer t. We thus write t = m for m ∈ N + and define t m (n) := f n (m). Moreover, we put t m = (t m (n)) n∈N . In particular t 1 = (t 1 (n)) n∈N = ((−1) s2(n) ) n∈N = (t n ) n∈N is the Prouhet-Thue-Morse sequence. It is clear that t m is the sequence obtained from the convolution of m copies of the Prouhet-Thue-Morse sequence, i.e., (4) t m (n) = i1+i2+...+im=n where we set put t m (n) = 0 for n < 0.
Proof. Let us expand F m (x) using the functional equation Comparing coefficients of the first and last expression, we obtain the recurrence relations in the statement of our lemma.
Lemma 3.2. Let m be a positive integer. Then F m (x) ≡ (1 + x) −m (mod 2). In particular, for each n ∈ N.
Proof. In order to prove our result let us recall the identity This proves the first part of our lemma. In order to get the second part we compare the coefficients (modulo 2) of x n on both sides of the first and last term in the above congruence. Our result follows.
We can also describe the 2-adic valuation of the numbers t 3 (n), n ∈ N. We start with the following simple lemma.
Proof. It suffices to use the recurrence for the sequence (t 3 (n)) n∈N twice.
Proposition 3.6. For each n ∈ N the following equalities hold: where in the second equality we assume that t 3 (n) = 0 for n < 0.
One can prove by induction on n ∈ N + that every positive integer n can be uniquely written in the form n = d j=0 4 j a j , where a j ∈ {0, 1, 3, 6} for j < d and a d ∈ {1, 2, 3, 6}. Then the 2-adic valuation of t 3 (n), n ∈ N + can be described in the following way.
Theorem 3.7. For each n ∈ N + there holds Proof. The proof will be performed by induction on d. If d = 0 then n ≤ 6 and we check the statement of our theorem one by one. If d > 0 then we write n = 4n ′ + a 0 . Then n ′ = d−1 If a 0 ∈ {0, 1} then by Proposition 3.6 the number t 3 (n) is odd and our assertion follows. If a 0 ∈ {3, 6} then we use Proposition 3.6 and the induction hypothesis to obtain the following:

3.2.
Unboundedness of t m for m = 2 k and m = 3. As an application of Lemma 3.1 we get: for each n ∈ N.
Proof. We will prove by induction that Clearly, the above inequality holds for n ∈ {0, 1}. If n > 1 and is even then we write n = 2n ′ for some n ′ ∈ N. We use Lemma 3.1 and the induction hypothesis (we recall that t m (n) = 0 for n < 0).
If n > 1 is odd then we write n = 2n ′ + 1 for some n ′ ∈ N and by Lemma 3.1 we obtain the following: Let us observe that the crude estimation using the fact that |t 1 (n)| = 1 gives only the equality t m (n) = O(n m ). The above result shows that there is a lot of cancellation in the sum defining t m (n) and it is quite natural to ask whether the sequence t m is bounded or not. Unfortunately, we were unable to answer this question in general but we believe that the following is true. The next result shows that if the sequence t m is unbounded on one side then it is unbounded on both sides. Proof. Suppose that lim sup n→∞ t m (n) = +∞ and t m (n) ≥ −C for some positive constant C. We have is a constant independent of n. From our assumption lim sup n→∞ m(t m (n) + C) = +∞ so we get a contradiction.
One can prove our lemma in the remaining case lim inf n→∞ t m (n) = −∞ and t m (n) < C for some positive constant C, by replacing t m (n) by −t m (n).
Using the expression for ν 2 (t 2 k (n)) presented in Theorem 3.3 and the above result, we immediately get In the case of m = 2, 3 we can give more precise result. Let Theorem 3.12. Let k ∈ N 3 . We have the following equalities: Moreover, for m = 3 and k ∈ N we have Proof. We start with the case of m = 2. First, let us observe that t 2 (2 k − 1) = (−2) k for each k ∈ N + . We will prove by induction on k ∈ N 3 the following statement: Clearly, our statement is true for k = 3. Let us assume that the statement holds for some k ∈ N 3 . We will show that it holds for k + 1. If n ≤ 2 k and n = 2 k − 1 then obviously |t 2 (n)| < 2 k .
Hence it suffices to prove the statement for n > 2 k . Let us consider the case n = 2l.
Summing up our discussion, if k ∈ N 3 and n ∈ {0, ..., 2 k } then t 2 (n) takes on extremal values In order to get expressions for Max 3 (k) and Min 3 (k) we introduce some notation. Let F 1 (k) (respectively F 2 (k)) be the right side of the expression for Max 3 (k) (respectively Min 3 (k)) from the statement of our theorem. In the sequel we will need the following fact: if k ∈ N + and n ∈ {0, . . . , 2 k − 2}, then One can easily check that The proof follows by simple induction on k. Indeed, the statement is true for k = 0, 1, 2, 3. Suppose that our inequalities hold for some k ≥ 4 and take n ∈ {0, . . . , 2 k+1 − 2}. We consider two cases: n even and n odd.
3.3. Vanishing of t 3 (n) and more properties of t 2 . In Theorem 3.3 we have found the explicit 2-adic valuation of t 2 k (n). Because the computed numbers are finite for each n ∈ N, as a consequence we get that the equation t 2 k (n) = 0 has no solution for each k. Because t 3 (2) = 0 it is quite natural to ask about a precise description of the sequence (a k ) k∈N+ defined by the property Although a description is given in Theorem 3.6 in terms of the expansion of the integer n in base 4 with digits from the set {0, 1, 3, 6}, we present a different one in terms of recurrence sequences. More precisely, we have the following.
We prove that From the equalities given in (11) and the fact that a 1 = 2, we get a k ∈ A 3 . Let us suppose that The above result has an interesting consequence.
Corollary 3.14. Let us consider the sequence of polynomials f (t) = (f n (t)) n∈N defined as the coefficients in the power series expansion of the series We expect that the vanishing of certain terms of the sequence t 3 is an exception and believe that the following is true Now we turn our attention to the behaviour of the sequence t 2 and prove that its values cover the set Z \ {0}. Before we present our result let us also note that the sequence t 2 is known as sequence A106407 in [17] and it is closely related to the sequence of the Stern polynomials (B n (t)) n∈N defined by the recurrence relation: The Stern polynomials were introduced by Klažar, Milutinović and Petr in [10]. Arithmetic properties of these polynomials were investigated in [18,19] and also in [8]. The connection of t 2 with the Stern polynomials is clear: we have This is interesting to note that B n (2) = n and {B n (1) : n ∈ N} = N. Moreover, the Stern sequence, i.e., the sequence (B n (1)) n∈N+ , can be also used to enumerate the positive rational numbers. More precisely, the values of the sequence (B n+1 (1)/B n (1)) n∈N+ cover Q + without repetitions.
We will show that B n+1 (−2) = t 2 (n) has a similar property.
First, we show that if t 2 (n) = k has a solution then there are infinitely many solutions.   Proof. We prove the first equality. We have Thus the value of t 2 (2 m n + 4) does not depend on m, and our equality holds. One can prove the other equalities in the same manner. Proof. Let us consider the sequence of rational numbers t2(n+1) t2(n) n∈N . We prove that for each pair of co-prime positive integers x, y where x is odd and y is even one of the fractions x y , y x , − y x , − x y is in our sequence. It is a generalisation of the well-known property of Stern diatomic sequence observed by Calkin and Wilf [5]. Let us consider the following four infinite binary trees of pairs of integers. In the root we put one of the pairs (2, −1), (−2, 1), (1, −2), (−1, 2). In the left child of (x, y) we put (x + y, −2y) and in the right child we put (−2x, x + y). We will prove that each pair of co-prime non-zero integers such that one of them is even is in exactly one of our trees.
Suppose that there is a pair of co-prime non-zero integers (a, b) such that one of them is even which is not in one of our trees. Let us choose such pair (a, b) with smallest |a| + |b| and in case of a tie with smallest |a+b|. Without loss of generality (a, b) = (2x, y) (when b is even we proceed in the same way). Let us consider the pair (−x, x+y). Of course gcd(−x, x+y) = gcd(x, y) = 1, moreover exactly one of the numbers −x, x+y is even. We have that |−x|+|x+y| ≤ |x|+|x|+|y| = |2x|+|y| and equality holds if and only if x and y have the same sign. In that case |2x+y| > |−x+(x+y)| = |y|. So from our assumptions either (−x, x + y) is in one of our trees or x + y = 0. If x + y = 0 then x = ±1, y = ∓1 and (2x, y) is one of the roots -a contradiction. So (−x, x + y) is in one of our trees but its right child is (2x, y), again a contradiction.
Let us observe that the tree with the root (−a, −b) can be obtained from the tree with the root (a, b) by multiplying all numbers in tree by −1. Moreover, the tree with root (a, b) can be obtained from the tree with root (b, a) by swapping the left and right child of each node and swapping the numbers in each pair. We can see that for each valid pair (x, y) at least one of the pairs (x, y), (−x, −y), (y, x), (−y, −x) is in the tree rooted in (−2, 1). Moreover, from our recurrence relation we get that when we read nodes of that tree row by row from left to right then we get the sequence of pairs ((t 2 (n + 1), t 2 (n))) ∞ n=0 .
Therefore for each odd integer k we can find an n such that t 2 (n) = k. Using now Lemma 3.16, we get the statement of our theorem for odd integers k. As every even number can be written in the form (−2) e (2n + 1), our theorem holds for even integers as well.
(t 2 (7), t 2 (6)) . . . . . . Based on numerical computations, we observed a striking symmetry in the set of values of t 2 (n). More precisely, we expect that the following is true The above conjecture is true as was proved by A. Schinzel. The proof is given in the Appendix.
We expect that Theorem 3.17 is an exception and believe that the following is true: 19. Let m be a positive integer ≥ 3. Then the set of those k ∈ Z such that the equation t m (n) = k has no solution in positive integers is infinite.

3.4.
Log-concavity of t 2 . In this subsection we will see that, as in the Prouhet-Thue-Morse sequence, there are no three consecutive terms of the sequence t 2 of the same sign. In order to prove this we will show two interesting inequalities concerning three consecutive terms of the sequence t 2 .
We apply the above result in order to get the following Theorem 3.21. The sequence (t 2 (n)) n∈N is log-concave, i.e., for each integer n ≥ 1 the following inequality holds (14) t 2 (n) 2 > t 2 (n − 1)t 2 (n + 1).
We are ready to prove that none of three consecutive terms of the sequence (t 2 (n)) n∈N have the same sign. Let us note that the same property holds for t 1 -the Prouhet-Thue-Morse sequence.
Theorem 3.22. For any positive integer n the numbers t 2 (n − 1), t 2 (n), t 2 (n + 1) do not have the same sign.

Arithmetic properties of the sequence (f (n, t)) n∈N with t ∈ Z <0
In this section we consider the sequence (f n (t)) n∈N with a fixed negative integer t. We thus put t = −m for m ∈ N + and we write b m (n) := f n (−m). Moreover, in order to shorten the notation we write In particular b 1 (n) = b(n) is the well known binary partition function introduced by Euler and studied by Churchhouse [6], Rødseth [16], Gupta [9] and others. It is sequence A018819 in [17]. Also the sequence (b(2n)) n∈N can be found in [17], namely as sequence A000123. It is clear that b m (n) is the convolution of m copies of the sequence (b(n)) n∈N . We thus have b m (n) = i1+i2+...+im=n m k=1 b(i k ).
From the above expression we easily deduce that the number b m (n) has a natural combinatorial interpretation. Indeed, b m (n) counts the number of representations of the integer n as the sum of powers of 2, where each summand can have one of m colors.
We start with the proof of the recurrence relations satisfied by the sequence (b m (n)) n∈N .
Moreover, the sequence (b m (n)) n∈N satisfies the following recurrence relations: Proof. The function H m satisfies the functional equation . In consequence we have Comparing now the coefficients on both sides of the above identity we get two equalities: From the first equality we get the expression for b m (2n + 1). From the second relation we get the expression for b m (2n). Finally, replacing i by i + 1, we get the relations given in the statement of our theorem.
In order to get the second part of our Lemma we use the same technique. From the functional A quick calculation reveals that and thus (after the substitution Comparing now the coefficients on the both sides of the above identity and using the symmetry property of binomial coefficients, we get the first identity given in the statement of our lemma. Using exactly the same type of reasoning and the identity we prove the second identity. We leave the details to the reader. 4.1. Some inequalities involving b m (n) for m = 1, 2. In the previous section we proved that t 2 (n) 2 − t 2 (n − 1)t 2 (n + 1) > 0. Using recurrence relations for the numbers b m (n), we can easily compute the sign of the expression b m (n) 2 − b m (n − 1)b m (n + 1) for m ∈ {1, 2}. Proposition 4.2. For n ∈ N + the following equalities hold: In particular, we have for m ∈ {1, 2} and each n ∈ N + .
Remark 4.3. The first to prove the first equality in Proposition 4.2, was D. Knuth, as was pointed out by B. Reznick in [15].
We also have the identity: Indeed, we have the following chain of inequalities: In the equality between third and fourth expression in the computation above we applied the identity G(x, y) = 2xy − (x − 1)(y + 1) − (x + 1)(y − 1) = 2 for x = 2(n − j) and y = 2(n − k). It seems that in this case b 2 (2n − 1) 2 − b 2 (2n − 2)b 2 (2n) < 0 for all n ∈ N + , but we were unable to prove this statement.  Proof. To prove the first part, we write m = 2 k (2u+1). Let us observe that for i = 0, 1, . . . , 2 k−1 −1 we have (by Legendre's formula for the 2-adic valuation of a factorial) v 2 ( 2 k 2i+1 ) = s 2 (2i + 1) + s 2 (2 k − (2i + 1)) − 1 = k. Thus the following congruence holds Using simple calculations we get the following equality: and comparing the coefficients of x n on both sides of the above congruence we get the result. For the second part; let us observe that For the third part; let us observe that (1 + x) ≡ (1 − x) + 2x (mod 4). Using analogous computations as before we get We let A denote the set of those u ∈ N + which end with even number of zeros in binary expansion. We have ∞ n=0 If we had b m (n) ≡ 0 (mod 4) for n large enough, then (1 + x) m ξ(x) would be a polynomial in . In the sequel we will also need the following simple observations concerning the binomial coefficients modulo 2 and 8. Proof. For each j ∈ {1, ..., 2 m − 1} we have ν 2 (2 m − j) = ν 2 (j). Hence ν 2 ((2 m − 1) · ... · (2 m − k)) = ν 2 (k!) for k ∈ {1, ..., 2 m − 1}. We thus have .., 2 m−1 } can be written in the form j = 2 k i for some k, i ∈ N, where i is an odd number. If k ≤ m − 4 then We thus obtain · 2 ≡ 6 (mod 8).
One of the main results of this paper is the following result concerning the computation of the 2-adic valuation of the members of the sequence (b 2 k −1 (n)) n∈N with fixed positive integer k. Our next theorem can be seen as a generalization of the identity obtained by Churchhouse (however, in a slightly different form). Here, t n is the n-th term of the Prouhet-Thue-Morse sequence.
Proof. First of all, let us observe that the second part of Lemma 4.4 and the first part of Lemma 4.5 implies that b 2 k −1 (n) is odd for n ≤ 2 k − 1 and thus ν 2 (b 2 k −1 (n)) = 0 in this case. Let us observe that from the identity where t n = t 1 (n) = (−1) s2(n) is n-th term of the Prouhet-Thue-Morse sequence. Now let us observe that from the first part of Lemma 4.4 and the second part of Lemma 4.5 we have for n = 0, 1, . . . , 2 k and b 2 k (n) ≡ 0 (mod 8) for n > 2 k , provided k ≥ 2 or n = 2. Moreover, b 2 (2) ≡ 2 2 + 4 0 0 = 5 (mod 8).
Summing up this discussion we have the following expression for b 2 k −1 (n) (mod 8), where k ≥ 2 and n ≥ 2 k : However, it is clear that t n−2 k−2 + t n−3·2 k−2 ≡ 0 (mod 2) and thus we can simplify the above expression and get b 2 k −1 (n) ≡ t n + t n−2 k + 6t n−2 k−1 (mod 8) for n ≥ 2 k . If k = 1 and n ≥ 2 then, analogously, we get t n−j b 2 k (j) (mod 8) ≡ t n + 5t n−2 + 2t n−1 (mod 8) and since t n−1 ≡ t n−2 (mod 2), we thus conclude that Let us put R k (n) = t n + t n−2 k + 6t n−2 k−1 . Using now the recurrence relations for t n , i.e., t 2n = t n , t 2n+1 = −t n we easily deduce the identities for k ≥ 2. Using a simple induction argument, one can easily obtain the following identities: for k ≥ 2, m ∈ N and j ∈ {0, ..., 2 k − 1}. From the above identity we easily deduce that R k (n) ≡ 0 (mod 8) for each n ∈ N and each k ≥ 1. If k = 1 then R 1 (n) = t n + 6t n−1 + t n−2 and R 1 (n) ≡ 0 (mod 8) if and only if t n = t n−1 = t n−2 . However, a well known property of the Prouhet-Thue-Morse sequence is that there are no three consecutive terms which are equal. If k ≥ 2 then our statement about R k (n) is clearly true for n ≤ 2 k . If n > 2 k then we can write n = 2 k m + j for some m ∈ N and j ∈ {0, 1, . . . , 2 k − 1}. Using the reduction (16) and the property obtained for k = 1, we get the result. Summing up our discussion, we have proved that ν 2 (b 2 k −1 (n)) ≤ 2 for each n ∈ N, since ν 2 (b 1 (n)) =∈ {0, 1, 2}. Moreover, as an immediate consequence of our reasoning we get the equality for j ∈ {0, ..., 2 k − 1}. Using the above identity and the properties of ν 2 (b 1 (2n)) we easily get the identities presented in the statement of our theorem.
It is an interesting question whether we can say something non-trivial about 2-adic valuation of the number b m (n) for m = 2 k − 1. In order to do this in the sequel we will need the following lemma concerning the form of the generating function of the subsequence (b m (2 k n + i)) n∈N , where k ∈ N is given and i ∈ {0, . . . , 2 k − 1}. We have the following Lemma 4.7. Let m ∈ N + be fixed. Let i, k ∈ N be given and consider the function where the (double) sequence of polynomials (h i,k (x)) k∈N,0≤i<2 k = (h i,k,m (x)) k∈N,0≤i<2 k satisfies h 0,0 (x) = 1 and for k ∈ N + and 0 ≤ i < 2 k we have Proof. We proceed by induction on k. We have the obvious equality h 0,0 (x) = 1. Let us suppose that our result is true for k. We then have for i = 0, 1, . . . , 2 k−1 − 1:

It is clear that
is an even function of x. Comparing now the first and the last expression from the above and replacing x by x 1/2 , we get the statement of our lemma. If i = 2 k−1 , . . . , 2 k −1 then we write i = 2 k +i ′ , where i ′ = 0, 1, . . . , 2 k−1 −1, and perform analogous calculations.
Replacing x by x 1 2 , we get the result.
The above lemma is a useful tool which sometimes allows to get congruences involving the (sub)sequence (b m (2 k n + i)) n∈N . We have the following results concerning the behaviour of F i,k (x) (mod p), where p is a prime number, m = p s for some s ∈ N + and k = 1, 2, 3. For k = 1 the following congruences hold: For k = 2 the following congruences hold: Proof. Direct calculations give: As a consequence of the above lemma we get the following interesting Corollary 4.9. Let p be an odd prime number and m = p s for some s ∈ N + . Then the following congruences are true: Proof. In order to obtain the first congruence it suffices to compare the coefficients of functions Using a different approach we get the following: Theorem 4.10. Let m ∈ N ≥2 . Then for n ∈ N the following identity holds: In particular, if gcd(m, n) = 1 then b m (n) ≡ 0 (mod m).
Proof. We have the following equality: Comparing now the coefficients on the both sides of the above identity, we get the first statement of our theorem. The second one is immediate.
Remark 4.11. Let p be an odd prime number and m = p s for some s ∈ N + . Let us observe that for each n ∈ N the following congruence holds: (17) b m ((2n + 1)m) ≡ b m (2nm) (mod p).

Indeed, we have
From the above congruence, we have b m (nm) ≡ b 1 (n) (mod p) for n ∈ N. Since b 1 (2n+1) = b 1 (2n), we obtain (17). Actually, in the same way we can prove that for r, s ∈ N + , a prime number p and n ∈ N we have .
In particular, if m = p s1 1 · · · p s k k is the factorization of a given positive integer m, n ∈ N and p si i ∤ n for each i ∈ {1, ..., k} then p 1 · · · p k | b m (n).
It is quite interesting to look at the family of polynomials (h i,k,m (x)) as an independent object of study and to ask which members of this family are reducible. It seems that this is a rather difficult question. Based on numerical observations, we state the following Theorem 4.14. We have h 2 k +1,k+1,2 (x) ≡ 0 (mod 8(x + 1)), k ∈ N + , h 2 k +2,k+1,4 (x) ≡ 0 (mod 8(x + 1)), k ∈ N ≥2 .
In order to prove the above theorem, we will show three lemmas.
The lemma given below is well known and we omit of its proof.
where a s+j ∈ Z. Then a s = c s . Moreover, if polynomials P 1 , P 2 , ..., P r are palindromic and there exists c ∈ N such that ord P i + deg P i = c for every i ∈ {1, 2, ..., r} then the polynomial r i=1 P i is palindromic.

Questions, remarks and conjectures
In this section we present several questions and conjectures which appeared during our work on this paper. We also present some related results.
We proved that the sequence ν 2 (t 2 k (n)) is 2-regular. This result motivates the following Question 5.1. Let m ∈ N ≥2 be given. Is the sequence (ν 2 (t m (n)) n∈N 2-regular?
We also expect that the following congruences are true.
Conjecture 5.5. Let m be a fixed positive integer. Then for each n ∈ N and k ≥ m + 2 the following congruence holds: b 2 m (2 k+1 n) ≡ b 2 m (2 k−1 n) (mod 2 k ).
Conjecture 5.6. Let m be a fixed positive integer. Then for each n ∈ N and k ≥ m + 2 the following congruence holds: In fact we expect the following.
Conjecture 5.7. Let m be a fixed positive integer. Then for each n ∈ N and given k ≫ 1 there is a non-decreasing function f : N → N such that f (k) = O(k) and the following congruence holds b m (2 k+1 n) ≡ b m (2 k−1 n) (mod 2 f (k) ).
According to numerical computations we noticed that for m ≥ 2 we have t m (3n) > 0, t m (3n + 1) < 0 for most values n ∈ N. However, t m (3n) < 0 for some n and similarly t m (3n + 1) > 0 for some n.
We also have seen that for initial values m, n ∈ N + , m ≥ 2, the numbers t m (n − 1), t m (n), t m (n + 1) do not have the same sign, as well. Moreover we noted that t m (n) 2 > t m (n − 1)t m (n + 1). Conjecture 5.9. For any m, n ∈ N + , m ≥ 2, the numbers t m (n − 1), t m (n), t m (n + 1) do not have the same sign and t m (n) 2 > t m (n − 1)t m (n + 1).