GENERALISED APÉRY NUMBERS MODULO 9 — WITH FULL LIST OF COROLLARIES

C. KRATTENTHALER^{†} AND T. W. MÜLLER^{∗}

Abstract. We characterise the behaviour of (generalised) Apéry numbers modulo 9, thereby in particular establishing two conjectures in “A method for determining the mod-3^{k} behaviour of recursive sequences” [arχiv:1308.2856].

1. Introduction

For non-negative integers r, s and n, the (generalised) Apéry numbers a_{n}(r, s) are defined by

a_{n}(r, s) = ∑_{k=0}^{n} \binom{n}{k}^{r}\binom{n + k}{k}^{s}.  (1.1)

The (classical) Apéry numbers a_{n}(2, 1) and a_{n}(2, 2) appear in Apéry’s proof [2] of the irrationality of ζ(2) and ζ(3) (cf. also [7]) as the leading coefficients in certain linear forms in ζ(2) and 1, and in ζ(3) and 1, respectively. Similarly, the Apéry numbers a_{n}(r, 1) appear as leading coefficients in linear forms in ζ(r), ζ(r − 2), …, 1 in [3], where it is shown that infinitely many values among ζ(3), ζ(5), ζ(7), … are irrational. In the past, the general Apéry numbers a_{n}(r, s) have been the object of numerous arithmetic investigations, see, for instance, [1, 4, 6, 8, 13] for a highly non-exhaustive selection.

We point out that the Apéry numbers with second parameter s = 0 have received special attention in the literature. It is simple to see that a_{n}(1, 0) = 2^{n} and a_{n}(2, 0) = \binom{2n}{n}. The numbers a_{n}(3, 0) are also known under the name of “Franel numbers,” and the more general numbers a_{n}(r, 0) for r ≥ 4 as “extended” or “generalised Franel numbers.”

Given a prime number p and the p-adic expansion of n, n = n_{0} + n_{1}p + n_{2}p^{2} + ⋯ + n_{m}p^{m}, it follows from more general theorems of McIntosh [12, Theorems 3 and 6] that the factorisation

a_{n}(r, s) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, s) (mod p)  (1.2)

holds. Deutsch and Sagan [6, Theorem 5.9] rediscover this factorisation, and they use it to characterise the congruence classes of a_{n}(r, s) modulo 3 in terms of precise conditions which the 3-adic expansion of n must satisfy. Gessel [8] obtains the above factorisation in the special case where r = s = 2, and furthermore, in Theorem 3(iii) of that paper, proves that the factorisation (1.2) remains valid for r = s = 2 with 9 in place of the modulus p.

2010 Mathematics Subject Classification. Primary 05A15; Secondary 11A07 .

Key words and phrases. Apéry numbers, congruences.

†Research partially supported by the Austrian Science Foundation FWF, grants Z130-N13 and F50-N15, the latter in the framework of the Special Research Program “Algorithmic and Enumerative Combinatorics”

∗Research supported by Lise Meitner Grant M1661-N25 of the Austrian Science Foundation FWF.

The goal of our paper is to determine the behaviour of the Apéry numbers a_{n}(r, s) modulo 9 for arbitrary positive integers r and non-negative integers s. This will be achieved by first deriving a Lucas-type result for binomial coefficients modulo 9 (see Lemma 1 in the next section), and using this to establish an analogue of formula (1.2) for the modulus 9; see Theorems 2 and 3 in Section 3. From these theorems, one easily derives explicit congruences for a_{n}(r, s) depending on the congruence classes of r and s modulo 6; see Section 4. In particular, Corollaries 24 and 25 confirm Conjectures 65 and 66 from [10] concerning the explicit description of the classical Apéry numbers a_{n}(2, 1) and a_{n}(2, 2) modulo 9. As a side result, we obtain generalisations of Gessel’s factorisation result for a_{n}(2, 2) modulo 9 mentioned above; see the remark after (4.6).

We point out that Rowland and Yassawi [14] have also provided proofs for Conjectures 65 and 66 from [10] (among many other things), using however a completely different approach, based on extracting diagonals from rational power series and construction of automata. It is conceivable that their approach would also achieve proofs of the other results in this paper.

It should be clear that our approach could also be used to obtain explicit descriptions of the congruence classes of Apéry numbers modulo higher powers of 3, and the same remark applies to the approach in [14]. The analysis and the results would be more complex than the ones in this paper, though.

2. A Lucas-type theorem modulo 9

The classical result of Lucas in [11, p. 230, Eq. (137)] says that, if p is a prime, n = n_{0}+n_{1}p+n_{2}p^{2}+⋯+n_{m}p^{m}, and k = k_{0}+k_{1}p+k_{2}p^{2}+⋯+k_{m}p^{m}, 0 ≤ n_{i}, k_{i} ≤ p−1, then

\binom{n}{k} ≡ ∏_{i=0}^{m} \binom{n_{i}}{k_{i}} (mod p).

Using the generating function approach proposed in [9, Sec. 6], we find an analogue of this formula for the modulus 9, which is different from the mod-9 cases of the generalisations of Lucas’ formula to prime powers given in [5] and [9].

Lemma 1. For all non-negative integers n = n_{0} + 3n_{1} + 9n_{2} + ⋯ + 3^{m}n_{m} and k = k_{0} + 3k_{1} + 9k_{2} + ⋯ + 3^{m}n_{m}, where 0 ≤ n_{i}, k_{i} ≤ 2 for all i, we have

\binom{n}{k} ≡ \binom{n_{0}}{k_{0}}\binom{n_{1}}{k_{1}} ⋯ \binom{n_{m}}{k_{m}}

+ ∑_{ν=1}^{m} 3n_{ν}χ(n_{ν−1} = 0)\binom{n_{0}}{k_{0}} ⋯ \binom{n_{ν−2}}{k_{ν−2}}\binom{1}{k_{ν−1} − 1}\binom{n_{ν} − 1}{k_{ν}}\binom{n_{ν+1}}{k_{ν+1}} ⋯ \binom{n_{m}}{k_{m}}

+ ∑_{ν=1}^{m} 3n_{ν}χ(n_{ν−1} = 1, k_{ν−1} = 0)\binom{n_{0}}{k_{0}} ⋯ \binom{n_{ν−2}}{k_{ν−2}}\binom{n_{ν}}{k_{ν}} ⋯ \binom{n_{m}}{k_{m}}

− ∑_{ν=1}^{m} 3n_{ν}χ(n_{ν−1} = 1)\binom{n_{0}}{k_{0}} ⋯ \binom{n_{ν−2}}{k_{ν−2}}\binom{2}{k_{ν−1}}\binom{n_{ν} − 1}{k_{ν}}\binom{n_{ν+1}}{k_{ν+1}} ⋯ \binom{n_{m}}{k_{m}}

+ ∑_{ν=1}^{m} 3n_{ν}χ(n_{ν−1} = 2, k_{ν−1} = 1)\binom{n_{0}}{k_{0}} ⋯ \binom{n_{ν−2}}{k_{ν−2}}\binom{n_{ν}}{k_{ν}} ⋯ \binom{n_{m}}{k_{m}} (mod 9), (2.1)

where χ(S) = 1 if S is true and χ(S) = 0 otherwise.

Proof. During this proof, given polynomials f(z) and g(z) with integer coefficients, we write

f(z) = g(z) modulo 9

to mean that the coefficients of z^{i} in f(z) and g(z) agree modulo 9 for all i. We use an analogous notation for the modulus 3.

An easy induction shows that

(1 + z)^{3^{ν}} = 1 + z^{3^{ν}} + 3z^{3^{ν−1}} (1 + z^{3^{ν−1}}) modulo 9.

This implies the expansion

(1 + z)^{n} = (1 + z)^{n_{0}}((1 + z)^{3})^{n_{1}}((1 + z)^{9})^{n_{2}} ⋯ ((1 + z)^{3^{m}})^{n_{m}}

= (1 + z)^{n_{0}} ∏_{ν=1}^{m} ((1 + z^{3^{ν}}) + 3z^{3^{ν−1}} (1 + z^{3^{ν−1}}))^{n_{ν}}

= ∏_{ν=0}^{m} (1 + z^{3^{ν}})^{n_{ν}} + ∑_{ν=1}^{m} 3n_{ν}(1 + z)^{n_{0}} ⋯ (1 + z^{3^{ν−2}})^{n_{ν−2}}

· z^{3^{ν−1}} (1 + z^{3^{ν−1}})^{n_{ν−1}+1} (1 + z^{3^{ν}})^{n_{ν}−1} ⋯ (1 + z^{3^{m}})^{n_{m}}

modulo 9.

Now, in case n_{ν−1} ≥ 1, one applies the formulae

z^{3^{ν−1}} (1 + z^{3^{ν−1}})^{2} = (1 + z^{3^{ν}}) − (1 + z^{3^{ν−1}})^{2} modulo 3
z^{3^{ν−1}} (1 + z^{3^{ν−1}})^{3} = z^{3^{ν−1}} (1 + z^{3^{ν}}) modulo 3

to the terms involving 3^{ν−1} in the sum, depending on whether n_{ν−1}+1 = 2 or n_{ν−1}+1 = 3. Finally, every binomial term (1 + z^{3^{r}})^{n′_{r}} is expanded using the binomial theorem, and subsequently the coefficient of

z^{k} = z^{k_{0}+3k_{1}+9k_{2}+···+3^{m}k_{m}}

is read off in all the terms. This leads directly to (2.1). □

3. The main theorems

Here we prove the actual main results of our paper, namely Theorems 2 and 3 below, which provide a refinement of (1.2) in the case where p = 3 to modulus 9. The explicit congruences for the Apéry numbers a_{n}(r, s) given in the next section are then simple consequences. We state the results for s ≥ 1 and s = 0 separately in order to keep expressions at a moderate size.

Theorem 2. For all positive integers r and s, and non-negative integers n = n_{0} +3n_{1} + 9n_{2} + ⋯ + 3^{m}n_{m}, where 0 ≤ n_{i} ≤ 2 for all i, we have

a_{n}(r, s) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, s) + 3 ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, s) ) f(n_{ν−1}, n_{ν}; r, s) (mod 9), (3.1)

where

f(n_{ν−1}, n_{ν}; r, s) = n_{ν−1}(n_{ν−1} + 1)n_{ν}(s(n_{ν} + 1) + (−1)^{s}(s(n_{ν} − 1) + rn_{ν}))

+ χ(r = 1)(n_{ν−1} + 2)(n_{ν−1} + 1)n_{ν}

+ χ(s = 1)((−1)^{r} − 1)(n_{ν−1} − 1)n_{ν−1}n_{ν}^{2}. (3.2)

Proof. By the definition (1.1) of the Apéry numbers and the Chu–Vandermonde summation formula, we may write

a_{n}(r, s) = ∑_{k=0}^{n} \binom{n}{k}^{r}\binom{n + k}{k}^{s} = ∑_{k=0}^{n} \binom{n}{k}^{r} (∑_{ℓ=0}^{n} \binom{n}{ℓ}\binom{k}{ℓ})^{s} .

Now we apply the Lucas-type congruence from Lemma 1 to all three binomial coefficients on the right-hand side of the above formula. Using the trivial congruences

(a + 3b)^{s} ≡ a^{s} + 3a^{s−1}b (mod 9)

and

(a + 3b)(c + 3d) ≡ ac + 3bc + 3ad (mod 9),

we expand the resulting expression. In this way, we obtain a large number of terms. Writing ℓ = ℓ_{0} + 3ℓ_{1} + 9ℓ_{2} + ⋯ + 3^{m}ℓ_{m}, the leading term is

∑_{0≤k_{1},...,k_{m}≤2} (∏_{i=0}^{m} \binom{n_{i}}{k_{i}}^{r}) ( ∑_{0≤ℓ_{1},...,ℓ_{m}≤2} ∏_{i=0}^{m} \binom{n_{i}}{ℓ_{i}}\binom{k_{i}}{ℓ_{i}})^{s} ,

while one obtains 12 more terms which are similar. At this point, the summation over the ℓ_{i}’s can be carried out easily, in all of the arising terms. This leads to the congruence

a_{n}(r, s) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, s)

+ 3r ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, s) ) ( ∑_{k_{ν−1}=0}^{2} \binom{1}{k_{ν−1} − 1}\binom{n_{ν−1}}{k_{ν−1}}^{r−1}\binom{n_{ν−1} + k_{ν−1}}{k_{ν−1}}^{s})

· (∑_{k_{ν}=0}^{2} \binom{n_{ν} − 1}{k_{ν}}\binom{n_{ν}}{k_{ν}}^{r−1}\binom{n_{ν} + k_{ν}}{k_{ν}}^{s}) χ(n_{ν−1} = 0)n_{ν} + ⋯

+ 3s ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, s) ) ( ∑_{k_{ν−1}=0}^{2} \binom{k_{ν−1} + 1}{k_{ν−1} − 1}\binom{n_{ν−1}}{k_{ν−1}}^{r}\binom{n_{ν−1} + k_{ν−1}}{k_{ν−1}}^{s−1})

· (∑_{k_{ν}=0}^{2} \binom{n_{ν} + k_{ν} − 1}{k_{ν}}\binom{n_{ν}}{k_{ν}}^{r}\binom{n_{ν} + k_{ν}}{k_{ν}}^{s−1}) χ(n_{ν−1} = 0)n_{ν} + ⋯

+ 3s ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, s) ) ( ∑_{k_{ν−1}=0}^{0} \binom{n_{ν−1} + 1}{n_{ν−1} − 1}\binom{n_{ν−1}}{k_{ν−1}}^{r}\binom{n_{ν−1} + k_{ν−1}}{k_{ν−1}}^{s−1})

· (∑_{k_{ν}=0}^{2} k_{ν}\binom{n_{ν} + k_{ν} − 1}{n_{ν}}\binom{n_{ν}}{k_{ν}}^{r}\binom{n_{ν} + k_{ν}}{k_{ν}}^{s−1}) + ⋯ (mod 9), (3.3)

where each of the dots ⋯ represents three similar terms. (All the sums above over ν come from the second line in (2.1).) The sums over k_{ν−1} and k_{ν} are written out explicitly. The resulting formula is then simplified using elementary congruences modulo 3. Namely, to simplify powers, we use

n^{a}(n + 1)^{b} ≡ (−1)^{b−1}n(n + 1) (mod 3), for a, b ≥ 1.

Furthermore, by

χ(n ≡ a (mod 3)) ≡ −(n − a + 1)(n − a + 2) (mod 3),  (3.4)

we may write

n^{a} ≡ χ(a = 0) + (1 − χ(a = 0))(−n(n + 1) − n(n − 1)(−1)^{a}) (mod 3), for a ≥ 0.

Finally, higher powers of n_{ν−1} and n_{ν} are lowered by use of the (Fermat) congruence

n^{3} ≡ n (mod 3).

After these steps, one collects terms, to obtain a congruence of the form

a_{n}(r, s) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, s) + 3 ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, s) ) f(n_{ν−1}, n_{ν}; r, s).

Upon considerable simplification, one sees that the term f(n_{ν−1}, n_{ν}; r, s) can be given by the right-hand side of (3.2). □

Remark. By applying (3.4) again several times (namely “backwards”), the term f(n_{ν−1}, n_{ν}; r, s) can alternatively be rewritten as

f(n_{ν−1}, n_{ν}; r, s) ≡ χ(n_{ν−1} = 1)(sχ(n_{ν} = 1) + (−1)^{s}sχ(n_{ν} = 2)
+ (−1)^{s}r(χ(n_{ν} = 0) − 1))
− χ(r = 1)χ(n_{ν−1} = 0)n_{ν}

+ χ(s = 1)((−1)^{r} − 1)χ(n_{ν−1} = 2)(χ(n_{ν} = 0) − 1) (mod 3). (3.5)

Following the same approach, we may establish an analogous result for the (generalised) Franel numbers; that is, for the case where s = 0.

Theorem 3. For all positive integers r and non-negative integers n = n_{0} + 3n_{1} + 9n_{2} + ⋯ + 3^{m}n_{m}, where 0 ≤ n_{i} ≤ 2 for all i, we have

a_{n}(r, 0) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, 0) + 3 ∑_{ν=1}^{m} ( _{∏_{i=0}^{m} ; i≠ν−1,ν}a_{n_{i}}(r, 0) ) f(n_{ν−1}, n_{ν}; r, 0) (mod 9), (3.6)

where

f(n_{ν−1}, n_{ν}; r, 0) = χ(r = 1)(n_{ν} − χ(n_{ν} = 2))(χ(n_{ν−1} = 2) − 1)

− (n_{ν} + χ(n_{ν} = 2)(−1)^{r})(χ(n_{ν−1} = 1) − (−1)^{r}χ(n_{ν−1} = 2)). (3.7)

4. Explicit description of the Apéry numbers modulo 9

We are now going to exploit Theorems 2 and 3 to obtain explicit congruences modulo 9 for the Apéry numbers a_{n}(r, s), depending on the congruence classes of r and s modulo 6. In view of (3.1) and (3.6), we have to analyse the congruence behaviour modulo 9 of a_{n}(r, s) for n = 0, 1, 2, as well as the behaviour modulo 3 of the terms f(n_{ν−1}, n_{ν}; r, s) given by (3.2) (or (3.5)) and (3.7).

We begin with the Apéry numbers for small indices. We have

a_{0}(r, s) = 1,  (4.1)

a_{1}(r, s) = 1 + 2^{s} ≡ \begin{cases}2 (mod 9), & if s ≡ 0 (mod 6), \\ 3 (mod 9), & if s ≡ 1 (mod 6), \\ 5 (mod 9), & if s ≡ 2 (mod 6), \\ 0 (mod 9), & if s ≡ 3 (mod 6), \\ 8 (mod 9), & if s ≡ 4 (mod 6), \\ 6 (mod 9), & if s ≡ 5 (mod 6), \end{cases}  (4.2)

and

a_{2}(r, s) = 1 + 2^{r}3^{s} + 6^{s} ≡ \begin{cases}3 (mod 9), & if r ≡ 0 (mod 6) and s = 0, \\ 4 (mod 9), & if r ≡ 1 (mod 6) and s = 0, \\ 6 (mod 9), & if r ≡ 2 (mod 6) and s = 0, \\ 1 (mod 9), & if r ≡ 3 (mod 6) and s = 0, \\ 0 (mod 9), & if r ≡ 4 (mod 6) and s = 0, \\ 7 (mod 9), & if r ≡ 5 (mod 6) and s = 0, \\ 1 (mod 9), & if r ≡ 0, 2 (mod 3) and s = 1, \\ 4 (mod 9), & if r ≡ 1 (mod 3) and s = 1, \\ 1 (mod 9), & if s ≥ 2. \end{cases}  (4.3)

Distinguishing between the various cases which arise when r and s run through the congruence classes modulo 6, we obtain

f(n_{ν−1}, n_{ν}; r, s)

≡ \begin{cases}0 (mod 3), & if r ≡ 0 (mod 3) and s ≡ 0 (mod 3), \\ χ(n_{ν−1} = 1)n_{ν} (mod 3), & if r ≡ 0 (mod 6) and s ≡ 1 (mod 6), \\ χ(n_{ν−1} = 1)(χ(n_{ν} = 0) − 1) (mod 3), & if r ≡ 0 (mod 3) and s ≡ 2 (mod 6), \\ χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) (mod 3), & if r ≡ 0 (mod 3) and s ≡ 4 (mod 6), \\ −χ(n_{ν−1} = 1)n_{ν} (mod 3), & if r ≡ 0 (mod 3) and s ≡ 5 (mod 6), \\ χ(n_{ν−1} = 1)(χ(n_{ν} = 0) − 1) − χ(n_{ν−1} = 0)n_{ν} (mod 3), \\ if r = 1 and s ≡ 0 (mod 6), \\ −n_{ν−1}χ(n_{ν} = 2) − n_{ν} (mod 3), & if r = s = 1, \end{cases}

(4.4) and

f(n_{ν−1}, n_{ν}; r, s)

≡ \begin{cases}χ(n_{ν} = 1)n_{ν−1} − n_{ν} − (1 − χ(n_{ν−1} = 0))(1 − χ(n_{ν} = 0)) (mod 3), \\ if r = 1, s ≡ 1 (mod 6), and s ≥ 7, \\ χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) − χ(n_{ν−1} = 0)n_{ν} (mod 3), \\ if r = 1 and s ≡ 2 (mod 6), \\ χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) − χ(n_{ν−1} = 0)n_{ν} (mod 3), \\ if r = 1 and s ≡ 3 (mod 6), \\ −χ(n_{ν−1} = 0)n_{ν} (mod 3), & if r = 1 and s ≡ 4 (mod 6), \\ (χ(n_{ν−1} = 2) − 1)n_{ν} + χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) (mod 3), \\ if r = 1 and s ≡ 5 (mod 6), \\ χ(n_{ν−1} = 1)(χ(n_{ν} = 0) − 1) (mod 3), \\ if r ≡ 1 (mod 3), r ≥ 4, and s ≡ 0 (mod 6), \\ χ(n_{ν−1} = 1)n_{ν} + (1 − χ(n_{ν} = 0))n_{ν−1} (mod 3), \\ if r ≡ 1 (mod 6), r ≥ 7, and s = 1, \\ −χ(n_{ν−1} = 1)χ(n_{ν} = 1) (mod 3), & if r, s ≡ 1 (mod 6) and r, s ≥ 7, \\ and if r ≡ 4 (mod 6) and s ≡ 1 (mod 6), \\ χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) (mod 3), \\ if r ≡ 1 (mod 3), r ≥ 4, \\ and s ≡ 2, 3 (mod 6), \\ 0 (mod 3), & if r ≡ 1 (mod 3), r ≥ 4, and s ≡ 4 (mod 6), \\ −χ(n_{ν−1} = 1)χ(n_{ν} = 2) (mod 3), \\ if r ≡ 1 (mod 3), r ≥ 4, and s ≡ 5 (mod 6), \\ χ(n_{ν−1} = 1)(1 − χ(n_{ν} = 0)) (mod 3), \\ if r ≡ 2 (mod 3) and s ≡ 0 (mod 6), \\ χ(n_{ν−1} = 1)χ(n_{ν} = 2) (mod 3), & if r ≡ 2 (mod 6) and s ≡ 1 (mod 6), \\ 0 (mod 3), & if r ≡ 2 (mod 3) and s ≡ 2 (mod 6), \\ χ(n_{ν−1} = 1)(χ(n_{ν} = 0) − 1) (mod 3), \\ if r ≡ 2 (mod 3) and s ≡ 3 (mod 6), \\ χ(n_{ν−1} = 1)(χ(n_{ν} = 0) − 1) (mod 3), \\ if r ≡ 2 (mod 3) and s ≡ 4 (mod 6), \\ χ(n_{ν−1} = 1)χ(n_{ν} = 1) (mod 3), & if r ≡ 2 (mod 3) and s ≡ 5 (mod 6), \\ χ(n_{ν−1} = 2)(χ(n_{ν} = 0) − 1) + χ(n_{ν−1} = 1)n_{ν} (mod 3), \\ if r ≡ 3 (mod 6) and s = 1, \\ χ(n_{ν−1} = 1)n_{ν} (mod 3), & if r ≡ 3 (mod 6), s ≡ 1 (mod 6), and s ≥ 7, \\ χ(n_{ν−1} = 1)n_{ν} − (1 − χ(n_{ν−1} = 0))(1 − χ(n_{ν} = 0)) (mod 3), \\ if r ≡ 5 (mod 6) and s = 1, \\ χ(n_{ν−1} = 1)χ(n_{ν} = 2) (mod 3), & if r ≡ 5 (mod 6), s ≡ 1 (mod 6), and s ≥ 7, \end{cases}

(4.5) and

f(n_{ν−1}, n_{ν}; r, s)

≡ \begin{cases}(χ(n_{ν−1} = 2) − χ(n_{ν−1} = 1))(χ(n_{ν} = 2) + n_{ν}) (mod 3), \\ if r ≡ 0 (mod 6), r ≥ 6, and s = 0, \\ (1 + χ(n_{ν−1} = 1))(χ(n_{ν} = 2) − n_{ν}) (mod 3), \\ if r = 1 and s = 0, \\ (χ(n_{ν−1} = 1) + χ(n_{ν−1} = 2))(χ(n_{ν} = 2) − n_{ν}) (mod 3), \\ if r ≡ 1, 3, 5 (mod 6), r ≥ 3, and s = 0, \\ (χ(n_{ν−1} = 2) − χ(n_{ν−1} = 1))(χ(n_{ν} = 2) + n_{ν}) (mod 3), \\ if r ≡ 2, 4 (mod 6) and s = 0. \end{cases}

(4.6)

Remark. By examining (4.4)–(4.6), one sees that Gessel’s result [8, Theorem 3(iii)], namely that

a_{n}(r, s) ≡ ∏_{i=0}^{m} a_{n_{i}}(r, s) (mod 9)  (4.7)

for r = s = 2, does not only hold in that case, but more generally for r ≡ 2 (mod 3) and s ≡ 2 (mod 6), and also for r ≡ s ≡ 0 (mod 3), and for r ≡ 1 (mod 3), r ≥ 4, and s ≡ 4 (mod 6).

If we combine Theorems 2 and 3 with (4.1)–(4.6), we obtain the following explicit descriptions of the behaviour of a_{n}(r, s) modulo 9.

Corollary 4. If r and s are positive integers with r ≡ 0 (mod 3) and s ≡ 0 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 6k digits 1, for some k, and otherwise only 0’s and 2’s;

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 1

digits 1, for some k, and otherwise only 0’s and 2’s; (iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 2

digits 1, for some k, and otherwise only 0’s and 2’s; (iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 5

digits 1, for some k, and otherwise only 0’s and 2’s;

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 4 digits 1, for some k, and otherwise only 0’s and 2’s;

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 3

digits 1, for some k, and otherwise only 0’s and 2’s; (vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 5. If r and s are positive integers with r ≡ 0 (mod 6) and s ≡ 1 (mod 6), or with r ≡ 3 (mod 6), s ≡ 1 (mod 6), and s ≥ 7, then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only; (ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 01 (including an occurrence of a 1 at the beginning) or of the string 11 — but not both — and otherwise contains only 0’s and 2’s;

(iii) in the cases not covered by Items (i)–(ii), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 2, 4, 5, 6, 7, 8 (mod 9) for all n.

Corollary 6. If r and s are positive integers with r ≡ 0 (mod 3) and s ≡ 2 (mod 6), or if r ≡ 1 (mod 3), r ≥ 4, and s ≡ 2 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 0 (mod 3);

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 2 (mod 3);

(iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 2 (mod 3);

(iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 0 (mod 3);

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 1 (mod 3);

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 1 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 7. If r and s are positive integers with r ≡ 0 (mod 3) and s ≡ 3 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) in all other cases a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 2, 3, 4, 5, 6, 7, 8 (mod 9) for all n.

Corollary 8. If r and s are positive integers with r ≡ 0 (mod 3) and s ≡ 4 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 0 (mod 3);

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 2 (mod 3);

(iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 1 (mod 3); (iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has an odd number

of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 1 (mod 3);

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 2 (mod 3);

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 0 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 9. If r and s are positive integers with r ≡ 0 (mod 6) and s ≡ 5 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 01 (including an occurrence of a 1 at the beginning) or of the string 11 — but not both — and otherwise contains only 0’s and 2’s;

(iii) in the cases not covered by Items (i)–(ii), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 2, 3, 4, 5, 7, 8 (mod 9) for all n.

Corollary 10. If s is a positive integer with s ≡ 0 (mod 6), then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} + o_{3} + o_{4} ≡ 0 (mod 3);

(ii) a_{n}(1, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}+o_{3}+o_{4} ≡ 0 (mod 3);

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} + o_{3} + o_{4} ≡ 1 (mod 3);

(iv) a_{n}(1, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}+o_{3}+o_{4} ≡ 2 (mod 3);

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} + o_{3} + o_{4} ≡ 2 (mod 3);

(vi) a_{n}(1, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}+o_{3}+o_{4} ≡ 1 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(1, s) is divisible by 9; in particular, a_{n}(1, s) ≢ 3, 6 (mod 9) for all n.

Corollary 11. Let n_{0} denote the 0-th digit in the 3-adic representation of the nonnegative integer n. The Apéry numbers a_{n}(1, 1) obey the following congruences modulo (i) a_{n}(1, 1) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ n_{0} (mod 3); (ii) a_{n}(1, 1) ≡ 3 (mod 9) if, and only if, n_{0} = 1; (iii) a_{n}(1, 1) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ n_{0} + 2 (mod 3); (iv) a_{n}(1, 1) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 11 and otherwise contains only 0’s and 2’s;

(v) a_{n}(1, 1) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ n_{0} + 1 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(1, 1) is divisible by 9; in particular, a_{n}(1, 1) ≢ 2, 5, 8 (mod 9) for all n.

Corollary 12. If s is a positive integer with s ≡ 1 (mod 6) and s ≥ 7, then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of strings 20 is ≡ 0 (mod 3);

(ii) a_{n}(1, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of 1, no occurrence of the string 10, and otherwise contains only 0’s and 2’s;

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of strings 20 is ≡ 1 (mod 3); (iv) a_{n}(1, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 11 and otherwise contains only 0’s and 2’s;

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of strings 20 is ≡ 2 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(1, s) is divisible by 9; in particular, a_{n}(1, s) ≢ 2, 5, 8 (mod 9) for all n.

Corollary 13. If s is a positive integer with s ≡ 2 (mod 6), then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} − o_{3} − o_{4} ≡ 0 (mod 3);

(ii) a_{n}(1, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}−o_{3}−o_{4} ≡ 2 (mod 3);

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} − o_{3} − o_{4} ≡ 2 (mod 3);

(iv) a_{n}(1, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}−o_{3}−o_{4} ≡ 0 (mod 3);

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d − o_{1} + o_{2} − o_{3} − o_{4} ≡ 1 (mod 3);

(vi) a_{n}(1, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has 2d+1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 10, o_{4} occurrences of the string 20, and d−o_{1}+o_{2}−o_{3}−o_{4} ≡ 1 (mod 3); (vii) in the cases not covered by Items (i)–(vi), a_{n}(1, s) is divisible by 9; in particular,

a_{n}(1, s) ≢ 3, 6 (mod 9) for all n.

Corollary 14. If s is a positive integer with s ≡ 3 (mod 6), then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of occurrences of the string 20 is ≡ 0 (mod 3);

(ii) a_{n}(1, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 11, or exactly one occurrence of the string 21 but no occurrence of the string 11, and otherwise contains only 0’s and 2’s;

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of occurrences of the string 20 is ≡ 1 (mod 3); iv) a_{n}(1, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 10, no occurrences of the strings 11 or 21, and otherwise contains only 0’s and 2’s;

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of occurrences of the string 20 is ≡ 2 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(1, s) is divisible by 9; in particular, a_{n}(1, s) ≢ 2, 5, 8 (mod 9) for all n.

Corollary 15. If s is a positive integer with s ≡ 4 (mod 6), then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 0 (mod 3);

(ii) a_{n}(1, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 2 (mod 3);

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 1 (mod 3);

(iv) a_{n}(1, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 1 (mod 3);

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 2 (mod 3);

(vi) a_{n}(1, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the sum of the number of occurrences of the string 10 and the number of occurrences of the string 20 is ≡ 0 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(1, s) is divisible by 9; in particular, a_{n}(1, s) ≢ 3, 6 (mod 9) for all n.

Corollary 16. If s is a positive integer with s ≡ 5 (mod 6), then the Apéry numbers a_{n}(1, s) obey the following congruences modulo 9:

(i) a_{n}(1, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of strings 20 is ≡ 0 (mod 3); (ii) a_{n}(1, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 10 or of the string 21 — but not both, and otherwise contains only 0’s and 2’s;

(iii) a_{n}(1, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of strings 20 is ≡ 1 (mod 3); (iv) a_{n}(1, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of 1 but no occurrence of the strings 10 or 21, and otherwise contains only 0’s and 2’s;

(v) a_{n}(1, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of strings 20 is ≡ 2 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(1, s) is divisible by 9; in particular, a_{n}(1, s) ≢ 2, 5, 8 (mod 9) for all n.

Corollary 17. If r and s are positive integers with r ≡ 1 (mod 3), r ≥ 4, and s ≡ 0 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 0 (mod 3);

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 2 (mod 3);

(iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 1 (mod 3);

(iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 2 (mod 3);

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 2 (mod 3);

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d − o_{1} + o_{2} ≡ 1 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 18. If r is a positive integer with r ≡ 1 (mod 6) and r ≥ 7, then the Apéry numbers a_{n}(r, 1) obey the following congruences modulo 9:

(i) a_{n}(r, 1) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ 0 (mod 3);

(ii) a_{n}(r, 1) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of 1 but no occurrence of the string 12, and otherwise contains only 0’s and 2’s;

(iii) a_{n}(r, 1) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ 1 (mod 3); (iv) a_{n}(r, 1) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 11 and otherwise contains only 0’s and 2’s; (v) a_{n}(r, 1) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ 2 (mod 3); (vi) in the cases not covered by Items (i)–(v), a_{n}(r, 1) is divisible by 9; in particular,

a_{n}(r, 1) ≢ 2, 5, 8 (mod 9) for all n.

Corollary 19. If r and s are positive integers with r, s ≡ 1 (mod 6) and r, s ≥ 7, or with r ≡ 4 (mod 6) and s ≡ 1 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n contains exactly

one 1, and otherwise only 0’s and 2’s; (iii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 11 and otherwise contains only 0’s and 2’s; (iv) in the cases not covered by Items (i)–(iii), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 2, 4, 5, 7, 8 (mod 9) for all n.

The case where r ≡ 1 (mod 3), r ≥ 4, and s ≡ 2 (mod 6) has already been treated in Corollary 6.

Corollary 20. If r and s are positive integers with r ≡ 1 (mod 3), r ≥ 4, and s ≡ 3 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 11 or of the string 21 — but not both — and otherwise contains only 0’s and 2’s;

(iii) in the cases not covered by Items (i)–(ii), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 2, 4, 5, 6, 7, 8 (mod 9) for all n.

Corollary 21. If r and s are positive integers with r ≡ 1 (mod 3), r ≥ 4, and s ≡ 4 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains an even number of digits 1, and otherwise only 0’s and 2’s;

(ii) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n contains an odd

number of digits 1, and otherwise only 0’s and 2’s; (iii) in the cases not covered by Items (i)–(ii), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 2, 3, 4, 5, 6, 7 (mod 9) for all n.

Corollary 22. If r and s are positive integers with r ≡ 1 (mod 3), r ≥ 4, and s ≡ 5 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 21 and otherwise contains only 0’s and 2’s; (iii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 01 (including an occurrence of a 1 at the beginning) and otherwise contains only 0’s and 2’s; (iv) in the cases not covered by Items (i)–(iii), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 2, 4, 5, 7, 8 (mod 9) for all n.

Corollary 23. If r and s are positive integers with r ≡ 2 (mod 3) and s ≡ 0 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 0 (mod 3);

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 0 (mod 3);

(iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 1 (mod 3);

(iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 2 (mod 3);

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has 2d digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 2 (mod 3);

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has 2d + 1 digits 1, o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, and d + o_{1} − o_{2} ≡ 1 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 24. If r and s are positive integers with r ≡ 2 (mod 6) and s ≡ 1 (mod 6), or with r ≡ 5 (mod 6), s ≡ 1 (mod 6), and s ≥ 7, then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 01 (including an occurrence of a 1 at the beginning) and otherwise contains only 0’s and 2’s;

(iii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 21 and otherwise contains only 0’s and 2’s; (iv) in the cases not covered by Items (i)–(iii), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 2, 4, 5, 7, 8 (mod 9) for all n.

For r = 2 and s = 1, this corollary establishes Conjecture 65 in [10].

Corollary 25. If r and s are positive integers with r ≡ 2 (mod 3) and s ≡ 2 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 6k digits 1, for some k, and otherwise only 0’s and 2’s;

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 5

digits 1, for some k, and otherwise only 0’s and 2’s; (iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 4

digits 1, for some k, and otherwise only 0’s and 2’s; (iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 1

digits 1, for some k, and otherwise only 0’s and 2’s;

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 2 digits 1, for some k, and otherwise only 0’s and 2’s;

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n contains 6k + 3

digits 1, for some k, and otherwise only 0’s and 2’s; (vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

For r = s = 2, this corollary establishes Conjecture 66 in [10].

Corollary 26. If r and s are positive integers with r ≡ 2 (mod 3) and s ≡ 3 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only;

(ii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 11 or of the string 21 — but not both — and otherwise contains only 0’s and 2’s;

(iii) in the cases not covered by Items (i)–(ii), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 2, 3, 4, 5, 7, 8 (mod 9) for all n.

Corollary 27. If r and s are positive integers with r ≡ 2 (mod 6) and s ≡ 4 (mod 6), then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 0 (mod 3);

(ii) a_{n}(r, s) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 1 (mod 3);

(iii) a_{n}(r, s) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 2 (mod 3);

(iv) a_{n}(r, s) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 2 (mod 3);

(v) a_{n}(r, s) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n has an even number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 1 (mod 3);

(vi) a_{n}(r, s) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n has an odd number of digits 1, and the difference of the number of occurrences of the string 11 and the number of occurrences of the string 21 is ≡ 0 (mod 3);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 28. If r and s are positive integers with r ≡ 2 (mod 3), s ≡ 5 (mod 6), and r, s > 1, then the Apéry numbers a_{n}(r, s) obey the following congruences modulo 9:

(i) a_{n}(r, s) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only; (ii) a_{n}(r, s) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 11 and otherwise contains only 0’s and 2’s; (iii) a_{n}(r, s) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n contains exactly

one 1, and otherwise only 0’s and 2’s; (iv) in the cases not covered by Items (i)–(iii), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 2, 4, 5, 7, 8 (mod 9) for all n.

Corollary 29. If r is a positive integer with r ≡ 3 (mod 6), then the Apéry numbers a_{n}(r, 1) obey the following congruences modulo 9:

(i) a_{n}(r, 1) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ 0 (mod 3);

(ii) a_{n}(r, 1) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of 1 but no occurrences of the strings 12 or 21, or it has exactly one occurrence of the string 11, and otherwise it contains only 0’s and 2’s;

(iii) a_{n}(r, 1) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ 1 (mod 3); (iv) a_{n}(r, 1) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 212 and otherwise contains only 0’s and 2’s;

(v) a_{n}(r, 1) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ 2 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(r, 1) is divisible by 9; in particular, a_{n}(r, 1) ≢ 2, 5, 8 (mod 9) for all n.

The case where r ≡ 3 (mod 6), s ≡ 1 (mod 6), and s ≥ 7 has already been treated in Corollary 5.

Corollary 30. If r is a positive integer with r ≡ 5 (mod 6), then the Apéry numbers a_{n}(r, 1) obey the following congruences modulo 9:

(i) a_{n}(r, 1) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ 0 (mod 3);

(ii) a_{n}(r, 1) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of 1 but no occurrences of the strings 012 or 210, and otherwise it contains only 0’s and 2’s;

(iii) a_{n}(r, 1) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and

2’s only, and the number of maximal strings of 2’s is ≡ 1 (mod 3); (iv) a_{n}(r, 1) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 210 (including an occurrence of a string 21 at the end) and otherwise contains only 0’s and 2’s;

(v) a_{n}(r, 1) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains 0’s and 2’s only, and the number of maximal strings of 2’s is ≡ 2 (mod 3);

(vi) in the cases not covered by Items (i)–(v), a_{n}(r, 1) is divisible by 9; in particular, a_{n}(r, 1) ≢ 2, 5, 8 (mod 9) for all n.

The case where r ≡ 5 (mod 6), s ≡ 1 (mod 6), and s ≥ 7, has already been treated in Corollary 24.

The Apéry numbers a_{n}(1, 0) are not interesting in our context, since a_{n}(1, 0) = 2^{n}. This is the reason why we ignore the value r = 1 in the following corollary.

Corollary 31. Let s(n) denote the sum of digits in the 3-adic expansion of n. If r is a positive integer with r ≡ 1 (mod 6) and r ≥ 7, then the Apéry numbers a_{n}(r, 0) obey the following congruences modulo 9:

(i) a_{n}(r, 0) ≡ 1 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 0 (mod 6);

(ii) a_{n}(r, 0) ≡ 2 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 1 (mod 6);

(iii) a_{n}(r, 0) ≡ 4 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 2 (mod 6);

(iv) a_{n}(r, 0) ≡ 5 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 5 (mod 6);

(v) a_{n}(r, 0) ≡ 7 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 4 (mod 6);

(vi) a_{n}(r, 0) ≡ 8 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s(n) + 2(−o_{1} + o_{2} + o_{3} − o_{4}) ≡ 3 (mod 6);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 32. If r is a positive integer with r ≡ 2 (mod 6), then the Apéry numbers a_{n}(r, 0) obey the following congruences modulo 9:

(i) a_{n}(r, 0) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, has an even number of digits 1, and the number of maximal strings of 1’s is ≡ 0 (mod 3);

(ii) a_{n}(r, 0) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, has an odd number of digits 1, and the number of maximal strings of 1’s is ≡ 1 (mod 3);

(iii) a_{n}(r, 0) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n contains the string 02 (including an occurrence of a 2 at the beginning), no other digit 2, and an odd number of digits 1;

(iv) a_{n}(r, 0) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, has an even number of digits 1, and the number of maximal strings of 1’s is ≡ 2 (mod 3);

(v) a_{n}(r, 0) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, has an odd number of digits 1, and the number of maximal strings of 1’s is ≡ 2 (mod 3);

(vi) a_{n}(r, 0) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n contains the string

02, no other digit 2, and an even number of digits 1; (vii) a_{n}(r, 0) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

has an even number of digits 1, and the number of maximal strings of 1’s is ≡ 1 (mod 3); (viii) a_{n}(r, 0) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

has an odd number of digits 1, and the number of maximal strings of 1’s is ≡ 0 (mod 3);

(ix) a_{n}(r, 0) ≡ 0 (mod 9) if, and only if, the 3-adic expansion of n contains at least two digits 2 or the string 12.

In the special case of this corollary where r = 2, we obtain the Apéry numbers a_{n}(2, 0) = \binom{2n}{n}, that is, the sequence of central binomial coefficients. The above result was found earlier in [10, Cor. 33] in an equivalent form.

Corollary 33. If r is a positive integer with r ≡ 3 (mod 6), then the Apéry numbers a_{n}(r, 0) obey the following congruences modulo 9:

(i) a_{n}(r, 0) ≡ 1 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion is ≡ 0 (mod 6);

(ii) a_{n}(r, 0) ≡ 2 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion

is ≡ 1 (mod 6); (iii) a_{n}(r, 0) ≡ 4 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion

is ≡ 2 (mod 6); (iv) a_{n}(r, 0) ≡ 5 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion

is ≡ 5 (mod 6);

(v) a_{n}(r, 0) ≡ 7 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion is ≡ 4 (mod 6);

(vi) a_{n}(r, 0) ≡ 8 (mod 9) if, and only if, the number of digits 1 in the 3-adic expansion

is ≡ 3 (mod 6); (vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular,

a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

Corollary 34. If r is a positive integer with r ≡ 4 (mod 6), then the Apéry numbers a_{n}(r, 0) obey the following congruences modulo 9:

(i) a_{n}(r, 0) ≡ 1 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 0 (mod 6);

(ii) a_{n}(r, 0) ≡ 2 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 1 (mod 6); (iii) a_{n}(r, 0) ≡ 3 (mod 9) if, and only if, the 3-adic expansion of n has exactly one

occurrence of the string 12, an odd number of digits 1, and otherwise contains only 0’s;

(iv) a_{n}(r, 0) ≡ 4 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 2 (mod 6);

(v) a_{n}(r, 0) ≡ 5 (mod 9) if, and only if, the 3-adic expansion of n contains no 2, and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 5 (mod 6);

(vi) a_{n}(r, 0) ≡ 6 (mod 9) if, and only if, the 3-adic expansion of n has exactly one occurrence of the string 12, an even number of digits 1, and otherwise contains only 0’s;

(vii) a_{n}(r, 0) ≡ 7 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 4 (mod 6); (viii) a_{n}(r, 0) ≡ 8 (mod 9) if, and only if, the 3-adic expansion of n contains no 2,

and has s_{1} digits 1 and s_{2} maximal strings of 1’s with 2o_{2} − s_{1} ≡ 3 (mod 6); (ix) a_{n}(r, 0) ≡ 0 (mod 9) if, and only if, the 3-adic expansion of n contains at least

two digits 2 or the string 02.

Corollary 35. Let s̃(n) denote the number of digits 1 in the 3-adic expansion of n minus 2 times the number of digits 2 in the same expansion. If r is a positive integer with r ≡ 5 (mod 6), then the Apéry numbers a_{n}(r, 0) obey the following congruences modulo 9:

(i) a_{n}(r, 0) ≡ 1 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 0 (mod 6);

(ii) a_{n}(r, 0) ≡ 2 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 1 (mod 6);

(iii) a_{n}(r, 0) ≡ 4 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 2 (mod 6);

(iv) a_{n}(r, 0) ≡ 5 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 5 (mod 6);

(v) a_{n}(r, 0) ≡ 7 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 4 (mod 6);

(vi) a_{n}(r, 0) ≡ 8 (mod 9) if, and only if, the 3-adic expansion contains o_{1} occurrences of the string 11, o_{2} occurrences of the string 21, o_{3} occurrences of the string 12, o_{4} occurrences of the string 22, and s̃(n) + 2(o_{1} − o_{2} − o_{3} + o_{4}) ≡ 3 (mod 6);

(vii) in the cases not covered by Items (i)–(vi), a_{n}(r, s) is divisible by 9; in particular, a_{n}(r, s) ≢ 3, 6 (mod 9) for all n.

References

[1] S. Ahlgren and K. Ono, A Gaussian hypergeometric series evaluation and Apéry number congruences, J. reine angew. Math. 518 (2000), 187–212.

[2] R. Apéry, Irrationalité de ζ(2) et ζ(3), Astérisque 61 (1979), 11–13.

[3] K. Ball et T. Rivoal, Irrationalité d’une infinité de valeurs de la fonction zêta aux entiers impairs, Invent. math. 146 (2001), 193–207.

[4] M. J. Coster, Supercongruences, in: p-adic analysis (Trento, 1989), Lecture Notes Math., vol. 1454, Springer–Verlag, Berlin, 1990, pp. 194–204,

[5] K. S. Davis and W. A. Webb, Lucas’ corollary for prime powers, Europ. J. Combin. 11 (1990), 229–233.

[6] E. Deutsch and B. E. Sagan, Congruences for Catalan and Motzkin numbers and related sequences, J. Number Theory 117 (2006), 191–215.

[7] S. Fischler, Irrationalité de valeurs de zêta (d’après Apéry, Rivoal, …), Séminaire Bourbaki 2002–2003, exposé no. 910, Astérisque 294 (2004), 27–62.

[8] I. M. Gessel, Some congruences for Apéry numbers, J. Number Theory 14 (1982), 362–368.

[9] A. Granville, Arithmetic properties of binomial coefficients, I: Binomial coefficients modulo prime powers, in: Organic mathematics (Burnaby, BC, 1995), CMS Conf. Proc., vol. 20, Amer. Math. Soc., Providence, RI, 1997, pp. 253–276.

[10] C. Krattenthaler and T. W. Müller, A method for determining the mod-3^{k} behaviour of recursive sequences, preprint; arχiv:1308.2856.

[11] E. Lucas, Théorie des fonctions numériques simplement périodiques, Amer. J. Math. 1 (1878), 184–240, 289–321.

[12] R. J. McIntosh, Generalization of a congruential property of Lucas, Amer. Math. Monthly 99 (1992), 231–238.

[13] K. Ono, Values of Gaussian hypergeometric series, Trans. Amer. Math. Soc. 350 (1998), 1205– 1223.

[14] E. Rowland and R. Yassawi, Automatic congruences for diagonals of rational functions, J. Théorie Nombres Bordeaux (to appear); arχiv:1310.8635.

†∗Fakultät für Mathematik, Universität Wien, Oskar-Morgenstern-Platz 1, A-1090

Vienna, Austria. WWW: http://www.mat.univie.ac.at/~kratt.

∗School of Mathematical Sciences, Queen Mary & Westfield College, University of London, Mile End Road, London E1 4NS, United Kingdom.