Congruences of concave composition functions

Concave compositions are ordered partitions whose parts are decreasing towards a central part. We study the distribution modulo $a$ of the number of concave compositions. Let $c(n)$ be the number of concave compositions of $n$ having even length. It is easy to see that $c(n)$ is even for all $n\geq1$. Refining this fact, we prove that $$\#\{n<X:c(n)\equiv 0\pmod 4\}\gg\sqrt{X}$$ and also that for every $a>2$ and at least two distinct values of $r\in\{0,1,\dotsc,a-1\}$, $$\#\{n<X: c(n)\equiv r\pmod{a}\}>\frac{\log_2\log_3 X}{a}.$$ We obtain similar results for concave compositions of odd length.


Introduction and statement of results
In their 1967 paper, Parkin and Shanks [5] conjectured that the partition function p(n) takes on even and odd values with equal likelihood. Very little is known about the distribution of the parity of p(n). Recently, Ahlgren [1] (see also the work of Berndt, Yee, and Zaharescu [3] as well as the works referenced therein) proved that the number of integers with an even number of partitions less than X is on the order of √ X. This improved on work of Mirsky [4] showing that about log log X numbers less than X have partition values in some nonzero residue class modulo any integer a, for the special case a = 2.
A combinatorial object similar to the set of partitions is the set of concave compositions -ordered partitions whose summands decrease towards a center summand.
We break up these compositions into the following three types, as defined by Andrews in [2].
Concave compositions of even length are ordered partitions of the form a 1 + a 2 + · · · + a m + b and a m ≥ 0. We denote the number of concave compositions of even length of an integer n by ce(n).
Concave compositions of odd length of type 1 are ordered partitions of the form and a m+1 ≥ 0. We denote the number of concave compositions of odd length of type 1 of n by co 1 (n).
Finally, concave compositions of odd length of type 2 are ordered partitions of the form a 1 + a 2 + · · · + a m+1 + b and a m+1 ≥ 0. We denote the number of concave compositions of odd length of type 2 of n by co 2 (n). Note that all concave compositions of odd length of type 1 are also of type 2.
It is natural to consider the distribution of these functions modulo a. To this end, we define E f (r, a; X) = #{n < X : f (n) ≡ r (mod a)}.
Since the function co 1 (n) is odd exactly when n is a triangular number (see the remark following Lemma 2.1), we define the function co ′ 1 (n) by subtracting 1 from co 1 (n) if n is triangular and keeping it the same otherwise. Then we have the following theorem.
Theorem 1.1. The following are true. (i) There exists an explicit constant c > 0 such that for sufficiently large X we have (ii) There exists an explicit constant c > 0 and 0 < α < 1 such that for sufficiently large X we have (iii) There exists an explicit constant c > 0 such that for sufficiently large X we have E co 2 (0, 2; X) > c √ X.
If we consider the more general case of a modulus a, we get a result similar to that of Mirsky [4].
for X sufficiently large. In the cases co 1 and co 2 this also applies when a = 2.
Although the above bound is the best we can prove, we expect the true distributions to be much more balanced.
Conjecture. For any modulus a ≥ 2, we have For ce, we expect similar asymptotics to hold, but without the last case. For co 2 , we expect uniformity across residue classes for any a.

Generating Functions
When faced with combinatorial objects such as concave compositions, it is natural to consider the generating functions for each object. Andrews found q-series expansions for each type of concave composition in Theorems 1-3 of [2], which we restate here.
Remark. It is easy to show that CO 1 (q) ≡ ∞ n=0 q n(n+1)/2 (mod 2), as follows. We have by Lemma 2.1 that (1 − q n ). By Lemma 12 of [2], we have that since the partitions into distinct parts are conjugate to the partitions into 1, 2, . . . , n missing nothing. The desired congruence follows.
Motivated by this congruence, we define CO ′ 1 (q) = ∞ n=0 co ′ 1 (n)q n = CO 1 (q) − ∞ n=0 q n(n+1)/2 , so that all of the coefficients of CO ′ 1 (q) are even. This will ease our study of the series modulo 4. With these, we can now proceed to the proofs of our main theorems.

Proofs of Theorems 1.1 and 1.2
Combining the expansions given by Andrews [2] with a generalization of Ahlgren's argument in [1], we prove our main theorem.
Proof of Theorem 1.1. (i) First, we show that the coefficients ce(n) are all even for n > 1. There is a natural pairing between non-palindromic concave compositions of even length given by mirroring the sequence. There is furthermore a natural pairing between palindromic compositions given by inserting or removing a pair of zeroes at the center of the sequence. Alternatively, Lemma 2.1 makes it clear that CE(q) ≡ 1 (mod 2).
(2.1) If a(n) is divisible by 4 and there are an odd number of summands, we can conclude that one of the summands is also divisible by 4. It is easy to see that there will be an odd number of summands exactly when 3k 2 +k 2 < n < 3(k+1) 2 −(k+1)

2
. As X tends to infinity, it is easy to show that the number of such n < X tends to 2 3 X from below very quickly, since 3(k+1) 2 −(k+1) 2 is almost exactly two-thirds of the way Thus for approximately 2 3 X values of n, one of the terms ce(i) must be congruent to 0 modulo 4. These terms may be overcounted by the number of decompositions of the form (2.1) in which they appear. This is bounded above by twice the number of pentagonal numbers less than X, which is . Thus we can conclude that we have, for some small constant ǫ, as desired.
(ii) We first write out the expansion of CO ′ 1 as in (i): Again writing the right hand side as ∞ n=0 a(n)q n , we notice that a(n) = 0 whenever n is not expressible as 6k 2 ± 2k or as the sum of a triangular and a pentagonal number. To obtain a bound on how many such terms there are, we first notice that there are at most values of n < X expressible as 6k 2 ± 2k. To find how many numbers less than X are expressible as the sum of a triangular and a pentagonal number, we use the result that if Q(x, y) is a positive definite binary quadratic form, #{n < X : n = Q(x, y) for some x, y ∈ Z} ≍ X log α X for some 0 < α < 1. For a presentation of a similar result, see Section 2 in [6].
Thus we have that there are at least X log α X−c log α X numbers n < X such that a(n) = 0. Then by an argument analogous to that in (i), we can conclude that (iii) This proof is analogous to the proof of (i), the only difference being that we need to exclude the values of n for which a(n) is nonzero. Thus the bound we get in this case is, for some small constant ǫ, implying the desired result.
We adapt the strategy of Mirsky in [4] to prove Theorem 1.2.
Proof of Theorem 1.2. Let E * ce (r, a; X) = #{n ≤ X : ce(n) ≡ r (mod a)}, and define E * co1 (r, a; X) and E * co2 (r, a; X) similarly. Fix r; then, in the case of CE, we claim that E * ce (r, a; X) > log 2 log 3 X − C for some constant C.
E ce (r ′ , a; X), we can write E ce (r ′ , a; X) > log 2 log 3 X − C, from which there is some r 1 so that E ce (r 1 , a; X) > 1 a − 1 log 2 log 3 X − C > 1 a log 2 log 3 X for X sufficiently large. Then we also have r ′ =r1 E ce (r ′ , a; X) = E * ce (r 1 , a; X) > log 2 log 3 X − C, giving some r 2 = r 1 so that E ce (r 2 , a; X) > 1 a log 2 log 3 X. This gives us two residues, r 1 and r 2 , with the desired bound in the CE case.