On $p$-adic valuations of colored $p$-ary partitions

Let $m\in\N_{\geq 2}$ and for given $k\in\N_{+}$ consider the sequence $(A_{m,k}(n))_{n\in\N}$ defined by the power series expansion $$ \prod_{n=0}^{\infty}\frac{1}{\left(1-x^{m^{n}}\right)^{k}}=\sum_{n=0}^{\infty}A_{m,k}(n)x^{n}. $$ The number $A_{m,k}(n)$ counts the number of representations of $n$ as sums of powers of $m$, where each summand has one among $k$ colors. In this note we prove that for each $p\in\mathbb{P}_{\geq 3}$ and $s\in\N_{+}$, the $p$-adic valuation of the number $A_{p,(p-1)(p^s-1)}(n)$ is equal to 1 for $n\geq p^s$. We also obtain some results concerning the behaviour of the sequence $(\nu_{p}(A_{p,(p-1)(up^s-1)}(n)))_{n\in\N}$ for fixed $u\in\{2,\ldots,p-1\}$ and $p\geq 3$. Our results generalize the earlier findings obtained for $p=2$ by Gawron, Miska and the first author.


Introduction
Let N denotes the set of nonnegative integers and P be the set of prime numbers. Let m ∈ N ≥2 and consider the sequence (a m (n)) n∈N defined by the power series expansion of the infinite product From the general theory of partitions (see the first chapter in the book of Andrews [3]) we know that the sequence (a m (n)) n∈N has a natural combinatorial interpretation. Indeed, we have a m (0) = 1 and for n ∈ N + , the number a m (n) counts the number of so called m-ary representations of a non-negative integer n, i.e., representations of the form where u ∈ N and ε i ∈ N for i ∈ {0, . . . , u}. Let us note that the m-ary representation is generalization of the (unique) representation of the integer n in the base m, i.e., the representation (1) with ε i ∈ {0, . . . , m − 1}. In the sequel we will need a notion of the p-adic valuation of an integer, where p ∈ P. The p-adic valuation of an integer n, denoted by ν p (n), is just the highest power of p dividing n, i.e., ν p (n) := max{k ∈ N : p k | n}. We also make standard convention that ν p (0) = +∞.
There are many papers devoted to the study of arithmetic properties of the sequence counting m-ary partitions. The case of m = 2 was investigated by Euler. However, it seems that the first non-trivial result concerning this case was proved by Churchhouse [5]. He proved that the sequence of the 2-adic valuations of (b(n)) n∈N is bounded by 2. More precisely, we have b(0) = 1, b(1) = 1 and if n ≥ 2, we have ν 2 (b(n)) = 2 if and only if n or n − 1 can be written in the form 4 r (2u + 1) for some r ∈ N + and u ∈ N. In the remaining cases the value of ν 2 (b(n)) is equal to 1. Churchhouse also stated some conjectures concerning the 2-adic behaviour of the difference a 2 (4n) − a 2 (n). These conjectures were independently proved by Rødseth [11] and Gupta [7] (see also the presentation given in Chapter 10 in the Andrews book). These results motivated the study of the divisibility of the difference a m (m r+1 n) − a m (m r n) by powers of m (in the case of odd m) or by powers of m/2 (in the case of even m). See for example the papers of Gupta [10,8], Andrews [2], Rødseth and Sellers [12,13].
Another kind of generalizations appeared in a recent work of Gawron, Miska and the first author [6]. More precisely, for k ∈ N + one can define the sequence The sequence (A m,k (n)) n∈N , as the sequence (a m (n)) n∈N , can be interpreted in a natural combinatorial way. More precisely, the number A m,k (n) counts the number of representations of n as sums of powers of m, where each summand has one among k colors. Equivalently, we are looking for the number of solutions in nonnegative integers of the system ε i = k j=1 ε i,j , where ε i comes from the m-ary representation given by (1). In [6], the sequence of the 2-adic valuations of A 2,k (n) was investigated. The authors proved that the sequence (ν 2 (A 2,k (n))) n∈N with k = 2 s − 1, s ∈ N + , is bounded by 2. In fact the precise description whether ν 2 (A 2,k (n)) = 1 or 2 is presented in the paper. Let m = p, where p is a prime number. A question arises: is it possible to find a simple expression for an exponent k, such that the sequence (ν p (A p,k (n))) n∈N is bounded or even can be described in simple terms? This natural question was the main motivation for writing this paper. As we will see the required generalization can be given and is presented in Theorem 3.1.
Let us describe the content of the paper in some details. In Section 2 we present some preliminary result needed in the sequel and present the proof of the lemma which contains precise information on the p-adic valuation of certain sums which are closely related to the coefficients of the power series expansion of F p (x) −r , where r ∈ {1, . . . , p − 1}.
In Section 3, among other things we present the computation of the exact value of the p-adic valuation of the number A p,(p−1)(p s −1) (n), where p ∈ P ≥3 and s ∈ N + . More precisely, for n ≥ p s , we prove the equality ν p (A p,(p−1)(p s −1) (n)) = 1. Note that the number k = (p − 1)(p s − 1) for p = 2 reduces to the exponent considered in [6]. However, in the mentioned paper the sequence of the 2-adic valuations of 2 s −1colored partitions is not eventually constant (and it is not periodic). This shows striking difference between the case of p = 2 and p ≥ 3. Moreover, we obtain some result concerning the boundedness of the sequence (ν p (A p,(p−1)(up s −1) (n))) n∈N for p ∈ P ≥3 , u ∈ {2, . . . , p − 1} and s ∈ N + . Finally, in the last section we state some conjectures on the shape of exponents k which (according to numerical calculations) lead to bounded (but not-eventually constant) sequences (ν p (A p,k (n))) n∈N .

Preliminary results and the main lemma
Before we state our theorems we will need some notation and preliminary results concerning various objects related to unique representation of integer n in the base p.
For a given p (non-necessarily a prime), an integer n and i ∈ {0, . . . , p − 1} we define The above number counts the number of the digits equal to i in the base p representation of the integer n. From the definition, we immediately deduce the following equalities: , with the convention that a b = 0 for b > a and 0 0 = 1. Moreover, for j ∈ {0, . . . , p− 1} and n ∈ N + we have Proof. The first equality is a simple consequence of the uniqueness of the base p representation of a given number n and the equality Indeed, the number D p,r (n) can be written as and hence our compact formula. In order to get the second part of our lemma we note that N p (i, n) = 1 for n ∈ {0, 1 . . . , r} and N p (i, n) = 0 for n ∈ {r + 1 . . . , p − 1}. With our convention we have that D p,r (n) = (−1) n r n in this case. Writing now n = pn ′ + j for some j ∈ {0, . . . , p − 1} we get and our lemma follows.
The above results are true without the assumption p ∈ P. However, from now up to the end of the paper we assume that p is an odd prime. Moreover, in order to shorten the notation a bit we define the number D p (n) as In particular D p (n) = 0 for all n ∈ N.
From the definition of the function F p (x) we get and thus we immediately deduce that F p (x) p−1 ≡ (1 − x) (mod p). Invoking now the property mentioned above with t = ν p (k) we get Write k = p νp(k) (p − 1)δ. Raising the both sides of the last congruence to the power δ we get the result.
We are ready to present the crucial lemma which will be the main tool in our study of the p-adic valuation of the number A p,(p−1)(up s −1) (n) in the sequel. More precisely, the lemma contains information about behaviour of the p-adic valuation of the expression Lemma 2.3. Let p ≥ 3 be prime and u ∈ {1, . . . , p − 1}. Let n ≥ p be of the form n = n ′′ p s+1 + kp s + j for some n ′′ ∈ N, k ∈ {1, . . . , p − 1}, s ∈ N + and j ∈ {0, . . . , p − 1}. Then the following equality holds: In particular: Proof. Let us suppose that n ∈ {u, . . . , p − 1}. Then Let n ≥ p and write n = pn ′ + j for some j ∈ {0, . . . , p − 1} and n ′ ∈ N + . We have Write n ′ = n ′′ p + k. If k ≥ 1, then If k = 0, then Hence if n ′ = p s (ap + k) with k ≥ 1, then Finally, for n ′ = p s , we get Thus, in any case we get that if n = n ′′ p s+1 + kp s + j for some n ′′ ∈ N, k ∈ {1, . . . , p − 1}, s ∈ N + and j ∈ {0, . . . , p − 1}, then The equality This finishes the proof of the main part of our lemma. In order to get the part (a), it is enough to observe that for u = 1 we have The result follows since 1 ≤ k ≤ p − 1.
If u is arbitrary and j ≥ u, then Hence we get the part (b). In order to prove the part (c) let us fix p and u. We want to find j and k such that Let us write Thus, we only need to find j ≤ u − 1 and k ∈ {1, . . . , p − 1} such that In consequence, the sufficient condition for the inequality (4) to hold, is the condition We prove that this is satisfied in at least one case j = 0 or j = 1. Let us observe that if j = 0, then Similarly, for j = 1 we have for j = 0 and j = 1, then p 2 divides also the number However, and we get a contradiction. The result follows.

The results
Now, we are ready to prove the following  Proof. Applying Lemma 2.2 with k = p s (p − 1) we get Raising both sides to the power u we get Multiplying both sides of the above congruence by F p (x) 1−p we get Equivalently, by using Lemma 2.1 and comparing coefficients on both sides of the above congruence, we get the congruence Let us take n > up s and write for some t ≥ s and n s ≥ u. Let us define the numbers n 0 , . . . , n t recursively in the following way n 0 :=n, We start by proving the part (f). Let s ≥ 2. Observe, that the formula implies that if p ∤ k, then p s | p s k . Hence, using Lemma 2.1, we get which does not depend on ε 0 . Hence we get (f). In order to prove parts (a) to (e) it is enough to show that there exists a constant C 1 not divisible by p, such that and then apply Lemma 2.3. From the formula (5) we see that the condition p s−1 ∤ k implies p 2 | p s k . We proceed similarly as in the proof of the part (f). Indeed, we have In the case of s = 1, the starting sum is of the same form with C 2 = 1. It is clear that C 2 ≡ 0 (mod p). We need to investigate the expression in the brackets.
Observe that if p does not divide i, then p| up s ip s−1 . We also have D p (n) ≡ 1 (mod p) and The last equivalence is a consequence of Lucas theorem. Hence Thus, we get the congruence The result now follows from Lemma 2.2.
We have already proved a quite strong result concerning the behaviour of the p-adic valuation of A p,k (n) for certain exponents k. The question arises: can we prove something in the opposite direction? More precisely: is it possible, given any s ∈ N + , to construct an exponent k ∈ N + such that the congruence A p,k (n) ≡ 0 (mod p s ) has infinitely many solutions?
We are ready to investigate more closely the set E p := {s ∈ N : there exists k ∈ N such that A p,k (n) ≡ 0 (mod p s ) for infinitely many n ∈ N}.
From Lemma 2.2 we immediately deduce that E p = N. However, for s ∈ N + , the exponents k in this case are divisible by p. Can we produce exponents without this property? The answer to this question is contained in the following Theorem 3.2. Let k ∈ N + , p ∈ P ≥3 and suppose that p 2 (p−1)|k and r ∈ {1, . . . , p− 2}.
Then, there are infinitely many n ∈ N + such that Proof. From the assumption p − 1|k and the congruence Multiplying both sides of the above congruence by F (x) −r we obtain Hence, comparing coefficients on both sides of the above congruence we get the congruence Let n > δp ν and write n = pn ′ + j for some n ′ ∈ N and j ∈ {0, . . . , p − 1}. Let us observe that if p ∤ i, then p ν | δp ν i . Thus In consequence, A p,k−r (n) ≡ 0 (mod p ν ) for any n > δp ν = k/(p − 1) satisfying n ≡ j (mod p), where j ∈ {r + 1, . . . , p − 1} is arbitrarily chosen. The proof is complete.
Remark 3.3. The above result can be seen as a (weak) generalization of the result obtained by Rødseth and Sellers in [12], which says that for any odd m and s ∈ N + , the congruence a m (n) ≡ 0 (mod m s ) has infinitely many solutions in n.
The weakness of our result is in the dependence of the number of colors and the exponent s.
From Lemma 2.2 and the proof of our theorem we can easily deduce the following Corollary 3.4. Let k ∈ N + and suppose that the sequence (ν p (A p,k (n))) n∈N is eventually constant and equal to 1.
The above conjecture was suggested by our numerical observations. Moreover, the form of the conjecture motivated the parts (c) to (f) in Theorem 3.1.
Let k ∈ N ≥2 be given. We say that the sequence ε = (ε n ) n∈N is k-automatic if and only if the following set K k (ε) = {(ε k i n+j ) n∈N : i ∈ N and 0 ≤ j < k i }, called the k-kernel of ε, is finite. In the case of p = 2 we know that the sequence (ν 2 (A 2,2 s −1 (n))) n∈N is 2-automatic (and it is not eventually periodic). In Theorem 3.1 we proved that the sequence (ν p (A p,k (n))) n∈N for k = (p− 1)(p s − 1) with p ≥ 3, is eventually constant and hence k-automatic for any k.