Congruences for Apéry numbers $β_{n}=\sum_{k=0}^{n}\binom{n}{k}^2\binom{n+k}{k}$
Hui-Qin Cao Yuri Matiyasevich Zhi-Wei Sun

 =17pt
Int. J. Number Theory 16(2020), no. 5, 981–1003.
Congruences for Apéry numbers β_n=∑_k=0^nnk^2n+kk]
Congruences for Apéry numbers β_n=∑_k=0^nnk^2n+kk
H.-Q. Cao, Yu. Matiyasevich and Z.-W. Sun]Hui-Qin Cao, Yuri Matiyasevich, and Zhi-Wei Sun

2010 Mathematics Subject Classification.
Primary 11B65; Secondary 11A07, 11B68, 11B75.
Keywords. Apéry numbers, Bernoulli numbers, congruences.
The research is supported by the NSFC-RFBR Cooperation and Exchange Program (NSFC Grant No. 11811530072,
RFBR Grant No. 18-51-53020-GFENxa).
The first and the third authors are also supported by the Natural Science Foundation of China (Grant No. 11971222).

(Hui-Qin Cao) Department of Applied Mathematics, Nanjing Audit University,
Nanjing 211815, People's Republic of China
<caohq@nau.edu.cn>

(Yuri Matiyasevich) St. Petersburg Department of Steklov Mathematical Institute of Russian Academy of Sciences, Fontanka 27, 191023, St. Petersburg, Russia
<yumat@pdmi.ras.ru>

(Zhi-Wei Sun, corresponding author) Department of Mathematics, Nanjing
University, Nanjing 210093, People's Republic of China
<zwsun@nju.edu.cn>



In this paper we establish some congruences involving the Apéry numbers
β_n=∑_k=0^nnk^2n+kk.
For example, we show that 
    ∑_k=0^n-1(11k^2+13k+4)β_k≡02n^2

for any positive integer n, and

    ∑_k=0^p-1(11k^2+13k+4)β_k≡ 4p^2+4p^7B_p-5p^8

for any prime p>3, where B_p-5 is the (p-5)th Bernoulli number. We also present certain relations between congruence properties of
the two kinds of Aṕery numbers,
 β_n and A_n=∑_k=0^n nk^2n+kk^2.


[
    [
    December 30, 2023
=====================



§ INTRODUCTION







In 1979 R. Apéry (see <cit.> and <cit.>) established the irrationality of ζ(3)=∑_n=1^∞ 1/n^3 by using the Apéry numbers

    A_n=∑_k=0^n
    nk^2n+kk^2  (n∈={0,1,2,…}).

His method also allowed him to prove the irrationality of ζ(2)=π^2/6 via another kind of Apéry numbers

    β_n:=∑_k=0^n nk^2n+kk  (n∈).


In 2012, the third author

<cit.> proved that

    ∑_k=0^n-1(2k+1)A_k0 n   for all n∈^+={1,2,3,…}

and

    ∑_k=0^p-1(2k+1)A_k p+ 76p^4B_p-3p^5  for any prime p>3,

where B_0,B_1,B_2,… are the Bernoulli numbers defined by

    B_0=1,  and ∑_k=0^nn+1kB_k=0  for all n∈^+.

(For the basic properties of Bernoulli numbers, see <cit.>.)
The third author

also conjectured that

    ∑_k=0^n-1(2k+1)(-1)^kA_k0 n  for all n∈^+

and

    ∑_k=0^p-1(2k+1)(-1)^kA_k pł( p3)̊p^3  for any prime p>3,

which was confirmed by V.J.W. Guo and J. Zeng <cit.>.
In 2016
the third author

<cit.> showed that

    ∑_k=0^n-1(6k^3+9k^2+5k+1)(-1)^kA_k0n^3  for all n∈^+.

In view of this, it is natural to ask whether the Apéry numbers β_n 
also have such kind of congruence properties. This is the main motivation of this paper.

Another motivation is due to  a theorem

of
E. Rowland and R. Yassawi  <cit.> about A_n (n∈) modulo 16.

We will extend their result to A_n modulo 32;
quite unexpectedly, this requires consideration
of β_n
 modulo 8.

Now we state our main results which were first found via Mathematica.

 For any positive integer n, we have

    ∑_k=0^n-1(11k^2+13k+4)β_k02n^2,
    
    ∑_k=0^n-1(11k^2+9k+2)(-1)^kβ_k02n^2,
    
    ∑_k=0^n-1(11k^3+7k^2-1)(-1)^kβ_k0n^2.




Let p>3 be a prime. Then

    ∑_k=0^p-1(11k^2+13k+4)β_k   ≡ 4p^2+4p^7B_p-5p^8,
    ∑_k=0^p-1(11k^2+9k+2)(-1)^kβ_k   ≡ 2p^2+10p^3H_p-1-p^7B_p-5p^8,

and

    ∑_k=0^p-1(11k^3+7k^2-1)(-1)^kβ_k
    
    ≡    2p^3-3p^2+(10p-5)p^3H_p-1-32p^7B_p-5p^8,

where H_p-1 denotes the harmonic number ∑_k=1^p-11k.



Let n be a nonnegative integer. If

    A_n≡ 8j+4i+1 16

with {i,j}⊆{0,1},
then

    β_n≡ 2(i+j)+1 4.


 For any n∈, we clearly have

    A_n=1+4∑_0<k nn+k2k^22k-1k-1^21 4.



 Let n be a nonnegative integer.
If

    A_n≡ 16k+8j+4i+1 32 and β_n≡4m+2l+1 8

with {i,j,k,l,m}⊆{0,1},
then

    L_2(n)≡ 4(k+m)+2j+i 8,

where L_2(n) (the
binary run-length of n) is defined as the number
of blocks of consecutive 0's and 1's in the binary expansion of n.




We will prove Theorem <ref> in the next section.
We are going to provide some lemmas in Section 3 and show Theorem <ref> in Section 4.
 Theorems <ref> and <ref>
will be proved in Section <ref>.




§ PROOF OF THEOREM 1.1







 For any n∈^+, we have

    ∑_k=0^n-1(11k^2+13k+4)β_k=-∑_k=0^n-1nk+1^2n+kka_1(n,k),
    ∑_k=0^n-1(11k^2+9k+2)(-1)^n-1-kβ_k=∑_k=0^n-1nk+1^2n+kka_2(n,k),
    ∑_k=0^n-1(11k^3+7k^2-1)(-1)^n-1-kβ_k
    =∑_k=0^n-1nk+1^2n+kka_3(n,k),

where

    a_1(n,k)=   n^3-n^2k-nk^2-2n^2-5nk+k^2-4n+2k+1,
    
    a_2(n,k)=   n(3n-k-1),
    
    a_3(n,k)=   4n^3-2n^2k-nk^2-4n^2-3nk+k^2-2n+2k+1.


.  Note that

    ∑_k=0^n-1(11k^2+13k+4)β_k=∑_k=0^n-1∑_l=0^n-1F(k,l)

is a double sum with

    F(k,l)=(11k^2+13k+4) kl^2k+ll.

Using the method in Mu and Sun's paper <cit.>, we find

    F_1(k,l)=-(k-l)^2a_1(k,l)(l+1)^2(11k^2+13k+4)F(k,l)

and

    F_2(k,l)=l(3kl-l^2+2k-2l)11k^2+13k+4F(k,l)

so that

    F(k,l)=(F_1(k+1,l)-F_1(k,l))+(F_2(k,l+1)-F_2(k,l))

which can be verified directly.
This allows us to reduce the double sum ∑_k=0^n-1∑_l=0^n-1F(k,l)
to the right-hand side of (<ref>).

Identities
(<ref>) and (<ref>) can be deduced similarly; in fact,

    (11k^2+9k+2)(-1)^k kl^2k+ll
    
    =   (G_1(k+1,l)-G_1(k,l))+(G_2(k,l+1)-G_2(k,l))

and

    (11k^3+7k^2-1)(-1)^k kl^2k+ll
    
    =   (H_1(k+1,l)-H_1(k,l))+(H_2(k,l+1)-H_2(k,l)),

where

    G_1(k,l)=   -(k-l)^2a_2(k,l)(l+1)^2(-1)^k kl^2k+ll,
    
     G_2(k,l)=   -l(6k+l+3)(-1)^k kl^2k+ll,
    
    H_1(k,l)=   -(k-l)^2a_3(k,l)(l+1)^2(-1)^k kl^2k+ll,
    
    H_2(k,l)=   -l(8k^2+l^2+4k+2l+2)(-1)^k kl^2k+ll.

This ends our proof.


 For any positive even integer n, we have

    ∑_k=0^n-1n-1kn+k2k2kk+112.


. Clearly,

    ∑_k=0^n-1n-1kn+k2k2kk+1
    =∑_0<k<nn-1kn+kk+1n-1k-1.

For k∈{0,…,n-1}, if 2| k then n+k is even and hence

    n+kk+1=n+kk+1n+k-1k02;

if 2∤ k then

    n-1k+n-1k-1= nk= nkn-1k-102.

Therefore,

    ∑_k=0^n-1n-1kn+k2k2kk+1   ∑_k=0^n-1n-1kn+kk+1n-1k
    
       ∑_k=0^n-1n-1k(-1)^k+1n+kk+1
    =   (-1)^n 2,

where we have applied (in the last step) the Chu-Vandermonde identity (cf. <cit.>). This proves (<ref>). 

Proof of Theorem 1.1. For each k=0,…,n-1, clearly

    nk+1^2(k+1)^2=n^2n-1k^2

and 
    nk+1^2n+kkn(k+1)=n^2n-1kn+k2k(n-k)C_k,

where C_k is the Catalan number 2kk/(k+1)=2kk-2kk+1.

(i) As

    a_1(n,k)=n^2(n-k-2)-n(k+1)(k+4)+(k+1)^2,

we have

    1n^2∑_k=0^n-1nk+1^2n+kka_1(n,k)
    
    =   ∑_k=0^n-1 nk+1^2n+kk(n-k-2)
    
       -∑_k=0^n-1n-1kn+k2k(n-k)(k+4)C_k
    +∑_k=0^n-1n-1k^2n+kk.


Clearly 11k^2+13k+402 for all k=0,…,n-1. So, by Lemma 2.1 and the above, (1.1) holds when 2∤ n.

Now suppose that n is even. By Lemma 2.1 and the above, we have

    1n^2∑_k=0^n-1(11k^2+13k+4)β_k
    
       ∑_k=0^n-1 nk+1n+kkk+∑_k=0^n-1n-1kn+k2kkC_k
    
       +∑_k=0^n-1n-1kn+kk
    2.

With the help of the Chu–Vandermonde identity,

    ∑_k=0^n-1 nk+1n+kkk=   ∑_k=0^n-1nn-1-k-n-1k(-1)^k k
    
       (-n-1)∑_k=1^n-1nn-1-k-n-2k-1
       -2n-2=(-1)^n(n-1)12
 and

    ∑_k=0^n-1n-1kn+kk
    =   ∑_k=0^n-1n-1k-n-1k(-1)^k
    
       ∑_k=0^n-1n-1n-1-k-n-1k
    
    =   -2n-1=(-1)^n n02.

In view of (<ref>), we also have

    ∑_k=0^n-1n-1kn+k2kkC_k12
 since kC_k=2kk+1. Therefore (<ref>) holds.

(ii) As a_2(n,k)=3n^2-(k+1)n, we have
 
    1n^2∑_k=0^n-1nk+1^2n+kka_2(n,k)
    
    =   3∑_k=0^n-1 nk+1^2n+kk-∑_k=0^n-1n-1kn+k2k(n-k)C_k.

Clearly 11k^2+9k+202 for all k=0,…,n-1. So, by Lemma 2.1 and the above, (1.2) holds when 2∤ n.

Now suppose that n is even. By Lemma 2.1 and the above, we have

    1n^2∑_k=0^n-1(11k^2+9k+2)(-1)^kβ_k
    
       ∑_k=0^n-1 nk+1n+kk+∑_k=0^n-1n-1kn+k2kkC_k2.

By the Chu–Vandermonde identity,

    ∑_k=0^n-1 nk+1n+kk
       ∑_k=0^n-1 nn-1-k-n-1k
    =-1n-112.

Combining this with (<ref>) we obtain (<ref>).


(iii) Since

    a_3(n,k)=2n^2(2n-k-2)-n(k+1)(k+2)+(k+1)^2,

we have

    1n^2∑_k=0^n-1nk+1^2n+kka_3(n,k)
    
    =   2∑_k=0^n-1 nk+1^2n+kk(2n-k-2)
    
       -∑_k=0^n-1n-1kn+k2k(n-k)(k+2)C_k
    +∑_k=0^n-1n-1k^2n+kk

and hence (<ref>) follows from (<ref>).

In view of the above, we have completed the proof of Theorem 1.1. 




§ SOME LEMMAS







For each s∈^+, we define

    H_n,s:=∑_0<k n1/k^s    for n=0,1,2,…,

and call such numbers harmonic numbers of order s. Those H_n:=H_n,1 (n∈) are usually called harmonic numbers.

 For any n∈^+, we have

    ∑_k=1^nnk(-1)^k-1/k=   H_n,
    
    ∑_k=1^nnk(-1)^k-1/kH_k=   H_n,2,
    
    ∑_k=1^nnk(-1)^k-1H_k,2=   H_n/n.



 The identities (<ref>)-(<ref>) are known.
See <cit.> for (<ref>), <cit.> for (<ref>),
and the proof of <cit.> for simple proofs of (<ref>) and (<ref>).



Let p>3 be a prime.
In 1900 J.W.L. Glaisher <cit.> refined Wolstenholme's work
<cit.> on congruences
by showing that

    H_p-1≡ -p^2/3B_p-3p^3

and

    H_p-1,s≡s/s+1pB_p-1-sp^2  for all s=1,…,p-2.



 (X. Zhou and T. Cai <cit.>) Let r,s∈^+. For any prime p>rs+2, we have

    ∑_1 i_1<i_2<…<i_r p-11i_1^si_2^s… i_r^s(-1)^rs(rs+1)2(rs+2)p^2B_p-rs-2p^3   if 2∤ rs,
    
    (-1)^r-1srs+1pB_p-rs-1p^2   if 2| rs.



 (i) (J. Zhao <cit.>) Let s,t∈^+ and let p s+t be a prime. Then

    ∑_1 j<k p-11j^sk^t(-1)^ts+ts+tsB_p-s-t p.

If s t2 and p>s+t+1, then

    ∑_1 j<k p-11j^sk^t   ł((-1)^sts+t+1s-(-1)^tss+t+1t-s-t)̊
       ×pB_p-s-t-12(s+t+1)p^2.


(ii) (J. Zhao <cit.>) Let r,s,t∈^+ with r+s+t odd. For any prime p>r+s+t, we have

    ∑_1 i<j<k p-11i^rj^sk^t   ł((-1)^rr+s+tr-(-1)^tr+s+tt)̊
       ×B_p-(r+s+t)2(r+s+t) p.


(iii) (J. Zhao <cit.>) For any prime p>5, we have

    ∑_1 i<j k p-11i^2jk∑_1 i<j k p-11ij^2k∑_1 i<j k p-11ijk^20 p.



 For any prime p>5, we have

    ∑_k=1^p-1∑_1 i<j k-11i^2j^225pB_p-5-3H_p-1p^2p^2

and

    ∑_k=1^p-1∑_1 i<j k-1H_k-1i^2j^23H_p-1p^2 p.


. (i) Clearly,

    ∑_k=1^p-1∑_1 i<j k-11i^2j^2+∑_1 i<j p-11i^2j^2
    =   ∑_1 i<j p-1∑_j<k p1i^2j^2=∑_1 i<j p-1p-ji^2j^2

and hence

    ∑_k=1^p-1∑_1 i<j k-11i^2j^2=(p-1)∑_1 i<j p-11i^2j^2-∑_1 i<j p-11i^2j.



Note that H_p-1,30p^2 by (<ref>) or Lemma <ref>,
and

    ∑_k=1^p-1H_k-1k^2-3H_p-1p^2p^2

by R. Tauraso <cit.>. Thus

    ∑_1 i<j p-11i^2j=   ∑_i=1^p-1H_p-1-H_ii^2
    =   H_p-1H_p-1,2-H_p-1,3-∑_i=1^p-1H_i-1i^23H_p-1p^2p^2.

By Lemma 3.2,

    ∑_1 i<j p-11i^2j^2-25pB_p-5p^2.

Combining these with (<ref>), we immediately obtain
(<ref>).

(ii) As H_p-10 p and

    ∑_s=1^p-1H_s=∑_1 r s p-11r=∑_r=1^p-1p-rr=pH_p-1-(p-1)1 p,

we have

    ∑_k=1^p-1∑_1 i<j k-1H_k-1i^2j^2
       ∑_1 i<j p-1∑_s=1^p-1H_s-∑_0<s<jH_si^2j^2
       ∑_1 i<j p-11i^2j^2ł(1-∑_1 r s<j1r)̊
    =   ∑_1 i<j p-11i^2j^2ł(1-∑_0<r<jj-rr)̊
    =∑_1 i<j p-11i^2j1-∑_0<r<j1r
    =   ∑_1 i<j p-11i^2j-∑_1 i<j p-11i^3j-∑_1 r<i<j p-11ri^2j-∑_1 i<r<j p-11i^2rj
       (-1)^13 32B_p-3-(-1)^1443B_p-4-0-03H_p-1p^2 p

with the help of Lemma <ref> and (<ref>). This proves (<ref>).

The proof of Lemma <ref> is now complete. 

 Let p>5 be a prime. Then

    ∑_k=1^p-1 pk(-1)^kkH_k-1,2910 p^2B_p-5p^3.


. As

    (-1)^k-1p-1k-1=∏_0 j<kł(1- pj)̊1-pH_k-1p^2
 for all k=1,…,p-1, we have

    ∑_k=1^p-1 pk(-1)^kkH_k-1,2=   p∑_k=1^p-1p-1k-1(-1)^kk^2H_k-1,2
        p∑_k=1^p-1pH_k-1-1k^2H_k-1,2p^3.

By (<ref>),

    ∑_k=1^p-1H_k-1,2k^2 -25pB_p-5p^2.

Note also that

    ∑_k=1^p-1H_k-1H_k-1,2k^2
    =   ∑_1 j<k p-1 1 i<k1ij^2k^2
    =   ∑_1 j<k p-11j^3k^2+∑_1 i<j<k p-11ij^2k^2+∑_1 j<i<k p-11j^2ik^2
       (-1)^23+23+23B_p-5+ł((-1)^1 51-(-1)^2 52)̊B_p-52×5+0
    
       2B_p-5-32B_p-5=B_p-52 p

with the help of parts (i) and (iii) of Lemma <ref>. Combining the above, we get the desired congruence
(<ref>). 

 For any prime p>5, we have

    2p-1p-11+2pH_p-1- 45p^5B_p-5p^6.


. It is known (cf. <cit.>) that

    2p-1p-1≡ 1+2pH_p-1+2/3p^3H_p-1,3p^6.

By Lemma <ref>,

    H_p-1,3-3×42×5p^2B_p-5=- 65p^2B_p-5p^3.

So, the desired congruence follows. 

 For any prime p>7, we have

    H_p-1+ p2H_p-1,2+p^26H_p-1,30p^6.


.  Clearly,

    ∑_k=1^p-11p-k   ∑_k=1^p-1p^6-k^6p-kł(-1k^6)̊
    =-∑_k=1^p-1p^5+p^4k+p^3k^2+p^2k^3+pk^4+k^5k^6
    =   -p^5H_p-1,6-p^4H_p-1,5-p^3H_p-1,4-p^2H_p-1,3-pH_p-1,2-H_p-1
       -p^3H_p-1,4-p^2H_p-1,3-pH_p-1,2-H_p-1p^6

since H_p-1,60 p and H_p-1,50p^2 by (<ref>) or Lemma <ref>.
Note that

    H_p-1,4 4pł(B_2p-62p-6-2B_p-5p-5)̊-23pH_p-1,3p^3

by <cit.>.
Therefore

    2H_p-1+pH_p-1,223p^2H_p-1,3-p^2H_p-1,3p^6

and hence (<ref>) follows. 


Let p>3 be a prime. If p>7 then (<ref>) has the following equivalent form

    2H_p-1+pH_p-1,225p^4B_p-5p^5

in view of (<ref>).
It is easy to see that (<ref>) also holds for p=5,7.




§ PROOF OF THEOREM <REF>








To prove Theorem <ref>, we need an auxiliary theorem.


Let p>5 be a prime. Then

    ∑_k=1^p-1pk^2p+k-1k-1≡ pH_p-1+910p^5B_p-5p^6,
         ∑_k=1^p-1pk^2p+k-1k-1k≡ -3p^2H_p-1+ 2110p^6B_p-5p^7,

and

    ∑_k=1^p-1pk^2p+k-1k-1k^2
    
    ≡    -p^2-(4p^5+4p^4+2p^3)H_p-1+45p^7B_p-5p^8.


 For each k=1,…,p-1, we clearly have

    1p pk=   (-1)^k-1k∏_0< j<kł(1- pj)̊
       (-1)^k-1k1-pH_k-1+p^2∑_1 i<j k-11ijp^3

and

    (-1)^k-1p-1k-1p+k-1k-1
    =   ∏_0<j<k(1-p^2j^2)
     1-p^2H_k-1,2+p^4∑_1 i<j k-11i^2j^2p^6.



Let r∈{0,1,2} and

    σ_r:=∑_k=1^p-1 pk^2p+k-1k-1k^r.

In view of the above, we have

    σ_r=   p∑_k=1^p-1 pkk^r-1p-1k-1p+k-1k-1
       p∑_k=1^p-1 pkk^r-1(-1)^k-11-p^2H_k-1,2+p^4∑_1 i<j k-11i^2j^2
       p∑_k=1^p-1 pkk^r-1(-1)^k-1+p^3∑_k=1^p-1 pkk^r-1(-1)^kH_k-1,2
       +p^5∑_k=1^p-1 pk(1-pH_k-1)k^r-1∑_1 i<j k-11i^2j^2p^8.


 Case 1. r=0.

 In this case,
 
    p∑_k=1^p-1 pkk^r-1(-1)^k-1=pH_p-1=pH_p-1

 by (<ref>), and hence

    σ_0 pH_p-1+p^3∑_k=1^p-1 pk(-1)^kkH_k-1,2 pH_p-1+ 910p^5B_p-5p^6

with the help of Lemma <ref>. This proves (<ref>).

 Case 2. r=1.

 In this case,
 
    p∑_k=1^p-1 pkk^r-1(-1)^k-1=-p∑_k=0^p pk(-1)^k=-p(1-1)^p=0,

 and also
 
    ∑_1 i<j<k p-11i^2j^2kł((-1)^2 52-(-1)^1 51)̊B_p-52×5=32B_p-5p

 by Lemma <ref>.
 Thus
 
    σ_1
      p^3∑_k=1^p-1 pk(-1)^kH_k-1,2+ 32p^6B_p-5p^7.


 In view of (<ref>) and (<ref>), we have
 
    ∑_k=1^p-1 pk(-1)^kH_k-1,2
     =   ∑_k=1^p pk(-1)^kH_k,2+H_p,2-∑_k=1^p-1 pk(-1)^kk^2
       -H_pp+H_p,2+p∑_k=1^p-11-pH_k-1+p^2∑_1 i<j k-11ijk^3
       -H_p-1p+H_p-1,2+pH_p-1,3-p^2∑_1 j<k p-11jk^3
       +p^3∑_1 i<j<k p-11ijk^3p^4.

 Note that
 
    H_p-1,225p^3B_p-5- 2pH_p-1p^4 and H_p-1,3- 65p^2B_p-5p^3

  by (<ref>) and (<ref>).
  In view of Lemma <ref>,
 
    ∑_1 j<k p-11jk^3ł(-3 51-(-1) 53-1-3)̊pB_p-52× 5=- 910pB_p-5p^2

 and
 
    ∑_1 i<j<k p-11ijk^3ł((-1)^1 51-(-1)^3 53)̊B_p-52×5=B_p-52 p.

 Therefore
 
    ∑_k=1^p-1 pk(-1)^kH_k-1,2   -3H_p-1p+25p^3B_p-5- 65p^3B_p-5+ 910p^3B_p-5+p^32B_p-5
       - 3pH_p-1+35p^3B_p-5p^4.

 Combining this with (<ref>), we see that
 
    σ_1 p^3ł(- 3pH_p-1+35p^3B_p-5)̊+ 32p^6B_p-5=-3p^2H_p-1+2110p^6B_p-5p^7.

 This proves (<ref>).

 Case 3. r=2.

 In this case,
 
    p∑_k=1^p-1 pkk^r-1(-1)^k-1=p^2∑_k=1^p-1p-1k-1(-1)^k-1=p^2ł((1-1)^p-1-1)̊=-p^2

 and hence
 
    σ_2   -p^2+p^4∑_k=1^p-1p-1k-1(-1)^kH_k-1,2
       +p^6∑_k=1^p-1∑_1 i<j k-11i^2j^2-p^7∑_k=1^p-1∑_1 i<j k-1H_k-1i^2j^2
       -p^2+p^4ł(H_p-1p-1+H_p-1,2)̊+p^6ł( 25pB_p-5-3H_p-1p^2)̊-p^73H_p-1p^2
       -p^2+p^4ł(-(p+1)H_p-1+25p^3B_p-5-2pH_p-1)̊
       +25p^7B_p-5-3p^4H_p-1-3p^5H_p-1p^8

 with the help of (<ref>), (<ref>) and Lemma <ref>.
 This yields the desired (<ref>).

 In view of the above, we have completed the proof of Theorem <ref>. 
Proof of Theorem <ref>. It is easy to see that (<ref>)-(<ref>) hold for p=5. Below we assume p>5.

For i=1,2,3 let

    S_i:=∑_k=0^p-1pk+1^2p+kka_i(p,k)

with a_i(n, k) given by Lemma <ref>.
In view of Lemma <ref>, it suffices to show the
following three congruences:

    S_1   ≡ -4p^2-4p^7B_p-5p^8,
    S_2   ≡ 2p^2+10p^3H_p-1+p^7B_p-5p^8,
    
    S_3   ≡ 2p^3-3p^2+(10p^4-5p^3)H_p-1- 32p^7B_p-5p^8,

Clearly,

    S_i=   ∑_j=1^ppj^2p+j-1j-1a_i(p,j-1)
    
    =   2p-1p-1a_i(p,p-1)+∑_k=1^p-1pk^2p+k-1k-1a_i(p,k-1).

Note that

    a_1(p,p-1)=-p^3-3p^2, a_2(p,p-1)=2p^2 and a_3(p,p-1)=p^3-2p^2.

In view of Lemma <ref>, we have

    2p-1p-1a_i(p,p-1)
    
       ł(1+2pH_p-1- 45p^5B_p-5)̊a_i(p,p-1)
    
       -p^3-2p^4H_p-1-3p^2-6p^3H_p-1+125p^7B_p-5p^8   if i=1,
    
    2p^2+4p^3H_p-1- 85p^7B_p-5p^8   if i=2,
    
    p^3+2p^4H_p-1-2p^2-4p^3H_p-1+ 85p^7B_p-5p^8   if i=3.


For r=0,1,2 let σ_r be defined as in (<ref>).
Noting 
    a_1(p,k-1)=(p^3-p^2)-(p^2+3p)k-(p-1)k^2

and applying Theorem <ref>, we get

    ∑_k=1^p-1 pk^2p+k-1k-1a_1(p,k-1)
    
    =   (p^3-p^2)σ_0-(p^2+3p)σ_1-(p-1)σ_2
    
       (p^3-p^2)ł(pH_p-1+910p^5B_p-5)̊
    -(p^2+3p)ł(-3p^2H_p-1+2110p^6B_p-5)̊
       -(p-1)ł(-p^2-(4p^5+4p^4+2p^3)H_p-1+ 45p^7B_p-5)̊
       p^3-p^2+(2p^4+6p^3)H_p-1-325p^7B_p-5p^8.

Combining this with (<ref>) and (<ref>), we get (<ref>).

Similarly,

    S_2   2p^2+4p^3H_p-1- 85p^7B_p-5+3p^2σ_0-pσ_1
    
       2p^2+4p^3H_p-1- 85p^7B_p-5+3p^2ł(pH_p-1+910p^5B_p-5)̊
       -pł(-3p^2H_p-1+2110p^6B_p-5)̊
       2p^2+10p^3H_p-1-p^7B_p-5p^8.

This proves (<ref>).

As

    a_3(p,k-1)=4p^3-2p^2-(2p^2+p)k-(p-1)k^2,

we have

    ∑_k=1^p-1 pk^2p+k-1k-1a_3(p,k-1)
    
    =   (4p^3-2p^2)σ_0-(2p^2+p)σ_1-(p-1)σ_2
    
       (4p^3-2p^2)ł(pH_p-1+910p^5B_p-5)̊
    -(2p^2+p)ł(-3p^2H_p-1+2110p^6B_p-5)̊
       -(p-1)ł(-p^2-(4p^5+4p^4+2p^3)H_p-1+ 45p^7B_p-5)̊
       p^3-p^2+(8p^4-p^3)H_p-1-3110p^7B_p-5p^8.

Combining this with (<ref>) and (<ref>), we get (<ref>).

The proof of Theorem <ref> is now complete. 



§ PROOFS OF THEOREMS <REF> AND <REF>







Clearly L_2(0)=0, and for each n∈^+ we have

    L_2(n)=L_2ł(ł⌊ n2⌋̊)̊+0   if n0,34,
    1   if n1,24.

E. Rowland and R. Yassawi discovered that the two least
 significant binary digits of  L_2(n)
are completely determined by the fourth and the third
least significant digits of  the Apéry number A_n.
(As A_n14, the two least significant digits of A_n
are always 0 and 1, and hence these digits contain no information
about n.)

 <cit.>
Let n∈. If

    A_n≡ 8j+4i+1  16
 with {i,j}⊆{0,1},
then

    L_2(n)≡ 2j+i 4.



Theorem <ref> shows that
 the fourth and the third
least significant digits of A_n
also determine the second least significant digit
of β_n (all numbers β_n are  odd, so the very least significant digit
is always 1).

Theorem <ref> shows that
 the knowledge of the five least significant digits of A_n
by itself is not sufficient for
 determining the  three least significant
digits of L_2(n). This is because the third least significant digit of
β_n can be 0 or 1. But the additional knowledge of this digit
gives the missing bit of information
for determining the three  least significant digits of
L_2(n) according to Theorem <ref>.








Theorems <ref> and <ref> can be proved
by the technique used in <cit.>
 with the aid of
software <cit.> implemented by E. Rowland.

Namely,
 Apéry numbers
of both kinds

are known to be the diagonal sequences of certain rational functions.
In particular, A. Straub <cit.> proved that A_n is the
coefficient of x_1^nx_2^nx_3^nx_4^n in the formal
Taylor expansion  of the function

    1/
     (1 - x_1 - x_2 )(1 - x_3 - x_4 ) - x_1 x_2 x_3 x_4.

Similar coefficient in the expansion of

    1/
     (1 - x_1 )(1 - x_2 )(1 - x_3 )(1 -x_4 ) - (1 - x_1 )x_1 x_2 x_3

is, according to <cit.>, equal to β_n.

According to <cit.>,
the above representations of Apéry numbers   as the diagonal coefficients
imply that for every prime p and its power q
the sequences  A_nq and β_nq
are p-automatic. Moreover,
<cit.> contains two algorithms  for
constructing corresponding automata;
Mathematica implementations of these algorithms are given
in <cit.>.

To prove Theorem <ref>, we need to examine the sequence
 A_n16. Corresponding automaton 𝒜_16
 was calculated in <cit.> and exhibited in <cit.>, we reproduce it here
 in Figure <ref> (with the initial state marked in light color). This automaton
 calculates  A_n16 in the following way. Let
 
    n=∑_k=0^m n_k2^k

where {n_0,…,n_m}⊆{0,1};
start from the initial state and follow the oriented path
formed by edges marked n_0,…,n_m; the final vertex is labeled by
A_n16.

Function  AutomaticSequenceReduce from <cit.>, being applied to  (<ref>),
returns the minimal
automaton ℬ_4 calculating
β_n4; this automaton is exhibited in Figure <ref>.

Let

    f(1)=f(13)=1  and   f(5)=f(9)=3.

Theorem <ref> asserts that

    (β_n4)=f(A_n16).

We can construct an automaton calculating f(A_n16)
simply by applying function f to the labels of states in
automaton 𝒜_16. The resulting automaton is
not minimal, but we can minimize it using,
for example,  function
AutomatonMinimize from <cit.>. The minimal automaton calculating f(A_n16)
turns out to be equal to ℬ_4, which proves (<ref>)
and hence Theorem <ref> is proved as well.










The minimal automaton 𝒜_32
calculating  A_n32 was constructed in <cit.>, it has 33 states;  the minimal
automaton ℬ_8 calculating  β_n8 has 17 states.
Taking into account Theorem <ref>,
for proving Theorem <ref> it is sufficient to work
just with the fifth least significant digits of A_n
and the third least significant digits of
β_n and L_2(n), which allows us to deal with automata
having  fewer
number of states.

Figures <ref> and <ref> exhibit the minimal
automata 𝒜_32,5 and ℬ_8,3
calculating  respectively the fifth least significant digit of A_n
and  the third least significant digit of
β_n.
These automata are easily constructed from
𝒜_32 and ℬ_8
by properly relabelling the states
and minimizing resulting automata.

With function AutomatonProduct from <cit.> we
can easily construct automaton 𝒞 which is
 the product of
𝒜_32,5 and ℬ_8,3. Each state  of  𝒞
is labeled by two bits  (corresponding to the fifth digit of A_n and
the third digit of β_n). Replacing each such pair of bits by their
sum modulo 2 and performing minimization,
we get the automaton exhibited on Figure <ref>. It is
not difficult  to see
that  this automaton calculates  the third digit of L_2(n),
which proves Theorem <ref>.

. The authors would like to thank the third author's PhD student Chen Wang
for helpful comments on Lemmas <ref> and <ref>.

99

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

Glaisher-1 J.W.L. Glaisher, Congruences relating to the sums of products of the first n numbers and to other sums of products, Quart. J. Math., 31(1900), 1–35.

Glaisher-2 J.W.L. Glaisher, On the residues of the sums of products of the first p-1 numbers, and their powers, to modulus p^2 or p^3, Quart. J. Math., 31(1900), 321–353.

Gould H. W. Gould, Combinatorial Identities, Morgantown Printing and Binding Co., 1972.

GZ V.J.W. Guo and J. Zeng, Proof of some conjectures of Z.-W. Sun on congruences for Apéry numbers, J. Number Theory 132 (2012), 1731–1740.

H V. Hernández, Solution IV of problem 10490, Amer. Math. Monthly 106 (1999), 589–590.

HT C. Helou and G. Terjanian, On Wolstenholme's theorem and its converse, J. Number Theory, 128(2008), 475–499.

IR K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, 2nd Ed., Grad. Texts. Math. 84, Springer, New York, 1990.

MS Y.-P. Mu and Z.-W. Sun, Telescoping method and congruences for double sums, Int. J. Number Theory 14 (2018), 143–165.

Rsoft
E. Rowland, Integer Sequences,
<https://people.hofstra.edu/Eric_Rowland/packages.html>.

Rpaper
E. Rowland,
Mathematica notebook with computations for <cit.>,
<https://people.hofstra.edu/Eric_Rowland/computations
/Automatic_congruences_for_diagonals_of_rational_functions.nb>

RY
E. Rowland and R. Yassawi,
Automatic congruences for diagonals of rational functions,
J.  Théor. Nombres Bordeaux 27 (2015), 245–288.

Straub
A. Straub, Multivariate Apéry numbers and supercongruences of rational functions, Algebra & Number Theory, 8 (2014), 1985–2008.

SZH Z.-H. Sun, Congruences concerning Bernoulli numbers and Bernoulli polynomials, Discrete Appl. Math. 105 (2000), 193–223.



Sun12a Z.-W. Sun, On sums of Apéry polynomials and related congruences, J. Number Theory 132 (2012), 2673–2699.

S15Z.-W. Sun, A new series for π^3 and related congruences,
Internat. J. Math. 26 (2015), no. 8, 1550055, 23 pages.

Sun16 Z.-W. Sun, Congruences involving g_n(x)=∑_k=0^n nk^22kkx^k,
Ramanujan J. 40 (2016), 511–533.

Tauraso R. Tauraso, More congruences for central binomial coefficients, J. Number Theory 130(2010), 2639–2649.

Po A. van der Poorten, A proof that Euler missed…Apéry's proof
of the irrationality of ζ(3) Math. Intelligencer 1 (1978/79), 195–203.


Wolstenholme J. Wolstenholme, On certain properties of prime numbers, Quart. J. Math. 5 (1862), 35–39.

Zh J. Zhao, Wolstenholme type theorem for multiple harmonic sums, Int. J. Number Theory
4 (2008), 73–106.

ZC X. Zhou and T. Cai, A generalization of a curious congruence of harmonic sums,
Proc. Amer. Math. Soc. 135 (2007), 1329–1333.

