Skip to content


  • Research
  • Open Access

A generalization of Morley’s congruence

Advances in Difference Equations20152015:254

  • Received: 5 April 2015
  • Accepted: 8 July 2015
  • Published:


We establish an explicit formula for q-analog of Morley’s congruence.


  • Morley’s congruence
  • q-analog
  • binomial sums


  • 11B68
  • 11B65
  • 11B83

1 Introduction

For arbitrary positive integer n, let
$$[n]_{q}=\frac{1-q^{n}}{1-q}=1+q+q^{2}+\cdots+q^{n-1}, $$
which is the q-analog of an integer n since \(\lim_{q\to1}(1-q^{n})/(1-q)=n\). Also, for \(n, m\in \mathbb{Z}\), define the q-binomial coefficients by
$$\left .\begin{bmatrix} {n}\\ {m} \end{bmatrix} \right ._{q}= \frac{[n]_{q}[n-1]_{q}\cdots [n-m+1]_{q}}{[m]_{q}[m-1]_{q}\cdots[1]_{q}} $$
when \(m\geqslant0\), and if \(m<0\) we set \(\bigl [{\scriptsize\begin{matrix}{}n\cr m\end{matrix}} \bigr ]_{q}=0\). It is easy to check that
$$\left .\begin{bmatrix} {n+1}\\ {m} \end{bmatrix} \right ._{q}=q^{m} \left .\begin{bmatrix} {n}\\ {m} \end{bmatrix} \right ._{q}+\left .\begin{bmatrix} {n}\\ {m-1} \end{bmatrix} \right ._{q}. $$
Some combinatorial and arithmetical properties of the binomial sums
$$\sum_{k=0}^{n}\binom{n}{k}^{a} \quad\mbox{and}\quad\sum_{k=0}^{n}(-1)^{k} \binom{n}{k}^{a} $$
have been investigated by several authors (e.g., Calkin [1], Cusick [2], McIntosh [3], Perlstadt [4]). Indeed, we know (cf. [5], equations (3.81) and (6.6)) that
$$ \sum_{k=0}^{2n}(-1)^{k} \binom{2n}{k}^{2}=(-1)^{n}\binom{2n}{n} $$
$$ \sum_{k=0}^{2n}(-1)^{k} \binom{2n}{k}^{3}=(-1)^{n}\binom{2n}{n} \binom{3n}{n}. $$
However, by using asymptotic methods, de Bruijn [6] has showed that no closed form exists for the sum \(\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}^{a}\) when \(a\geqslant4\). Wilf proved (in a personal communication with Calkin; see [1]) that the sum \(\sum_{k=0}^{n}\binom{n}{k}^{a}\) has no closed form provided that \(3\leqslant a\leqslant9\).
As a q-analog of (1.1), we have
$$ \sum_{k=0}^{2n}(-1)^{k}q^{(n-k)^{2}} \left .\begin{bmatrix} {2n}\\ {k} \end{bmatrix} \right ._{q}^{2}=(-1)^{n} \left .\begin{bmatrix} {2n}\\ {n} \end{bmatrix} \right ._{q^{2}}. $$
Indeed, from the well-known q-binomial theorem (cf. Corollary 10.2.2 of [7])
$$\sum_{k=0}^{n}\left .\begin{bmatrix} {n}\\ {k} \end{bmatrix} \right ._{q}(-1)^{k}q^{\binom{k}{2}}x^{k}=(x;q)_{n}, $$
$$\begin{aligned} (x;q)_{n}= \textstyle\begin{cases} (1-x) (1-xq)\cdots (1-xq^{n-1} ),&\mbox{if }n\geq1, \\ 1,&\mbox{if } n=0, \end{cases}\displaystyle \end{aligned}$$
it follows that
$$\begin{aligned} \bigl(x^{2};q^{2} \bigr)_{2n}&=(x;q)_{2n}(-x;q)_{2n}= \Biggl(\sum_{k=0}^{2n}\left .\begin{bmatrix} {2n}\\ {k} \end{bmatrix} \right ._{q}(-1)^{k}q^{\binom{k}{2}}x^{k} \Biggr) \Biggl(\sum_{k=0}^{2n}\left .\begin{bmatrix} {2n}\\ {k} \end{bmatrix} \right ._{q}q^{\binom{k}{2}}x^{k} \Biggr) \\ &=\sum_{m=0}^{4n}x^{m}\sum _{k=0}^{2n}\left .\begin{bmatrix} {2n}\\ {k} \end{bmatrix} \right ._{q}\left .\begin{bmatrix} {2n}\\ {m-k} \end{bmatrix} \right ._{q}(-1)^{k}q^{\binom{k}{2}+\binom{m-k}{2}}, \end{aligned}$$
whence (1.3) is derived by comparing the coefficients of \(x^{2n}\) in the equation above.
As early as 1895, with the help of De Moivre’s theorem, Morley [8] proved that
$$ (-1)^{\frac{p-1}{2}}\binom{p-1}{(p-1)/2}\equiv4^{p-1} \ \bigl(\operatorname{mod}\ p^{3}\bigr). $$
In [9], Pan gave a q-analog of Morley’s congruence and showed that
$$ (-1)^{\frac{n-1}{2}}q^{\frac{n^{2}-1}{4}}\left .\begin{bmatrix} {n-1}\\ {(n-1)/2} \end{bmatrix} \right ._{q^{2}}\equiv(-q;q)_{n-1}^{2}- \frac{n^{2}-1}{24}(1-q)^{2}[n]_{q}^{2} \ \bigl( \operatorname{mod}\ \Phi_{n}(q)^{3}\bigr), $$
$$\Phi_{n}(q)=\mathop{\prod_{1\leqslant j\leqslant n}}_{(j,n)=1} \bigl(q-e^{2\pi ij/n} \bigr) $$
is the nth cyclotomic polynomial. In this section, we shall establish a generalization of Morley’s congruence (1.4) proved by Cai and Granville [10], Theorem 6:
$$ \sum_{k=0}^{p-1}(-1)^{(a-1)k} \binom{p-1}{k}^{a}\equiv2^{a(p-1)}\ \bigl(\operatorname{mod}\ p^{3}\bigr) $$
for any prime \(p\geqslant5\) and positive integer a. We also shall obtain a generalization of (1.5) in view of (1.3).

Theorem 1.1

Let n be a positive odd integer. Then
$$\begin{aligned} &\sum_{k=0}^{n-1}(-1)^{(a-1)k}q^{a\binom{k+1}{2}} \left .\begin{bmatrix} {n-1}\\ {k} \end{bmatrix} \right ._{q}^{a} \\ &\quad\equiv(-q;q)_{n-1}^{a}+\frac{a(a-1)(n^{2}-1)}{24}(1-q)^{2}[n]_{q}^{2} \ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
Furthermore, we have
$$\begin{aligned} &q^{a(n^{2}-1)/4}\sum_{k=0}^{n-1}(-1)^{k}q^{a((n-1)/2-k)^{2}} \left .\begin{bmatrix} {n-1}\\ {k} \end{bmatrix} \right ._{q}^{2a} \\ &\quad\equiv(-q;q)_{n-1}^{2a}+\frac{a(a-2)(n^{2}-1)}{24}(1-q)^{2}[n]_{q}^{2} \ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$


Clearly (1.6) is the special case of (1.7) in the limiting case \(q->1\) for \(n=p\).

2 Some lemmas

In this section, the following lemmas will be used in the proof of Theorem 1.1.

Lemma 2.1

$$ q^{kn}\equiv1-k(1-q)[n]_{q}+ \frac{k(k-1)}{2}(1-q)^{2}[n]_{q}^{2} \ \bigl( \operatorname{mod}\ [n]_{q}^{3}\bigr). $$


$$ q^{kn}=\sum_{j=0}^{k}(-1)^{j} \binom{k}{j}(1-q)^{j}[n]_{q}^{j}\equiv 1-k(1-q)[n]_{q}+\frac{k(k-1)}{2}(1-q)^{2}[n]_{q}^{2} \ \bigl(\operatorname{mod}\ [n]_{q}^{3}\bigr). $$

Lemma 2.2

Let n be a positive odd integer. Then
$$\begin{aligned} \sum_{j=1}^{(n-1)/2} \frac{1}{[2j]_{q}^{2}} &=\sum_{j=1}^{(n-1)/2} \frac{q^{2j}}{[2j]_{q}^{2}}+(1-q)\sum_{j=1}^{(n-1)/2} \frac{1}{[2j]_{q}} \\ &\equiv-\frac{n^{2}-1}{24}(1-q)^{2}-\mathrm{Q}_{n}(2,q) (1-q)\ \bigl(\operatorname{mod}\ \Phi_{n}(q)\bigr), \end{aligned}$$
where the q-Fermat quotient is defined by
$$\mathrm{Q}_{n}(m,q)=\frac{(q^{m};q^{m})_{n-1}/(q;q)_{n-1}-1}{[n]_{q}}. $$

Lemma 2.3

Let n be a positive odd integer. Then
$$\begin{aligned} &2\sum_{j=1}^{(n-1)/2} \frac{1}{[2j]_{q}}+2\mathrm{Q}_{n}(2,q)-\mathrm{Q}_{n}(2,q)^{2}[n]_{q} \\ &\quad\equiv \biggl(\mathrm{Q}_{n}(2,q) (1-q)+\frac{n^{2}-1}{8}(1-q)^{2} \biggr)[n]_{q}\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{2} \bigr). \end{aligned}$$

When n is an odd prime, the above two lemmas have been proved in [9], equation (2.7) and [9], Theorem 1.1, respectively. Of course, clearly the same discussions are also valid for general odd n.

3 Proofs of Theorem 1.1

In this section, we shall prove (1.7) and (1.8).


By the properties of the q-binomial coefficients, we know that
$$\begin{aligned} (-1)^{k}\left .\begin{bmatrix} {n-1}\\ {k} \end{bmatrix} \right ._{q}&= \prod_{j=1}^{k} \frac{[j]_{q}-[n]_{q}}{q^{j}[j]_{q}}\\ &\equiv q^{-\binom{k+1}{2}} \Biggl(1-\sum_{j=1}^{k} \frac {[n]_{q}}{[j]_{q}}+\sum_{1\leqslant i< j\leqslant k}\frac {[n]_{q}^{2}}{[i]_{q}[j]_{q}} \Biggr)\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
$$\begin{aligned} &(-1)^{ak}q^{a\binom{k+1}{2}}\left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{a} \\ &\quad\equiv1-a\sum_{j=1}^{k} \frac{[n]_{q}}{[j]_{q}}+a\sum_{1\leqslant i< j\leqslant k}\frac{[n]_{q}^{2}}{[i]_{q}[j]_{q}}+ \binom{a}{2} \Biggl(\sum_{j=1}^{k} \frac{[n]_{q}}{[j]_{q}} \Biggr)^{2}\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
Noting that
$$\Biggl(\sum_{j=1}^{k}\frac{1}{[j]_{q}} \Biggr)^{2}=2\sum_{1\leqslant i< j\leqslant k}\frac{1}{[i]_{q}[j]_{q}}+ \sum_{j=1}^{k}\frac{1}{[j]_{q}^{2}}, $$
we have
$$\begin{aligned} &\sum_{k=1}^{n-1}(-1)^{(a-1)k}q^{a\binom{k+1}{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{a} \\ &\quad\equiv\sum_{k=1}^{n-1}(-1)^{k} \Biggl(1-a\sum_{j=1}^{k}\frac {[n]_{q}}{[j]_{q}}+a \sum_{1\leqslant i< j\leqslant k}\frac {[n]_{q}^{2}}{[i]_{q}[j]_{q}}+\binom{a}{2} \Biggl(\sum_{j=1}^{k}\frac {[n]_{q}}{[j]_{q}} \Biggr)^{2} \Biggr) \\ &\quad= \Biggl(-a\sum_{j=1}^{n-1} \frac{[n]_{q}}{[j]_{q}}+a^{2}\sum_{1\leqslant i< j\leqslant n-1} \frac{[n]_{q}^{2}}{[i]_{q}[j]_{q}}+\binom{a}{2}\sum_{j=1}^{n-1} \frac{[n]_{q}^{2}}{[j]_{q}^{2}} \Biggr)\sum_{k=j}^{n-1}(-1)^{k} \\ &\quad=-a\mathop{\sum_{j=1}}_{2\mid j}^{n-1}\frac{[n]_{q}}{[j]_{q}}+a^{2} \mathop{\sum_{1\leqslant i< j\leqslant n-1}}_{2\mid j}\frac {[n]_{q}^{2}}{[i]_{q}[j]_{q}}+\binom{a}{2}\mathop{\sum _{j=1}}_{2\mid j}^{n-1}\frac{[n]_{q}^{2}}{[j]_{q}^{2}}\ \bigl( \operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
Thus letting \(a=1\) in (3.1), we get
$$ \mathop{\sum_{1\leqslant i< j\leqslant n-1}}_{2\mid j}\frac {[n]_{q}^{2}}{[i]_{q}[j]_{q}} \equiv(-q;q)_{n-1}-1+\mathop{\sum_{j=1}}_{2\mid j}^{n-1} \frac{[n]_{q}}{[j]_{q}}\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3} \bigr), $$
whence by (2.3) and (3.2)
$$\mathop{\sum_{1\leqslant i< j\leqslant n-1}}_{2\mid j}\frac {1}{[i]_{q}[j]_{q}} \equiv \frac{\mathrm{Q}_{n}(2,q)^{2}}{2}+\frac{\mathrm{Q}_{n}(2,q)}{2}(1-q)+\frac {n^{2}-1}{16}(1-q)^{2} \ \bigl(\operatorname{mod}\ \Phi_{n}(q)\bigr). $$
Recalling (2.2) and (2.3), then we obtain
$$\begin{aligned} &\sum_{k=0}^{n-1}(-1)^{(a-1)k}q^{a\binom{k+1}{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{a} \\ &\quad\equiv1+a[n]_{q}\mathrm{Q}_{n}(2,q)+\binom{a}{2}[n]_{q}^{2} \mathrm{Q}_{n}(2,q)^{2}+\binom {a}{2}\frac{n^{2}-1}{12}(1-q)^{2}[n]_{q}^{2} \\ &\quad\equiv\sum_{j=0}^{a}\binom{a}{j}[n]_{q}^{j} \mathrm{Q}_{n}(2,q)^{j}+\binom {a}{2}\frac{n^{2}-1}{12}(1-q)^{2}[n]_{q}^{2} \\ &\quad=(-q;q)_{n-1}^{a}+\frac{a(a-1)(n^{2}-1)}{24}(1-q)^{2}[n]_{q}^{2} \ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
Let us turn to (1.8). Similarly
$$\begin{aligned} &\sum_{k=0}^{n-1}(-1)^{k}q^{2a\binom{k+1}{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{2a}-q^{a(n^{2}-1)/4} \sum_{k=0}^{n-1}(-1)^{k}q^{a((n-1)/2-k)^{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{2a} \\ &\quad=1-q^{a\binom{n}{2}}+\sum_{k=1}^{n-1}(-1)^{k}q^{2a\binom {k+1}{2}} \bigl(1-q^{a(\binom{n}{2}-nk)} \bigr)\left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{2a} \\ &\quad\equiv1-q^{a\binom{n}{2}}+\sum_{k=1}^{n-1}(-1)^{k} \bigl(1-q^{a(\binom {n}{2}-nk)} \bigr) \Biggl(1-2a\sum_{j=1}^{k} \frac{[n]_{q}}{[j]_{q}} \Biggr)\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3} \bigr). \end{aligned}$$
Recalling (2.1), then we have
$$1-q^{a(\binom{n}{2}-nk)}\equiv{} a \biggl(\frac{n-1}{2}-k \biggr) \bigl(1-q^{n} \bigr)+\binom{a((n-1)/2-k)}{2} \bigl(1-q^{n} \bigr)^{2}\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3} \bigr), $$
$$\begin{aligned} &\sum_{k=1}^{n-1}(-1)^{k} \bigl(1-q^{a(\binom{n}{2}-nk)} \bigr) \Biggl(1-2a\sum_{j=1}^{k} \frac{[n]_{q}}{[j]_{q}} \Biggr) \\ &\quad\equiv\frac{q^{a\binom{n}{2}}-q^{-a\binom {n}{2}}}{1+q^{an}}-2a^{2}\sum_{j=1}^{n-1} \frac{[n]_{q}}{[j]_{q}}\sum_{k=j}^{n-1}(-1)^{k} \biggl(\frac{n-1}{2}-k \biggr) \bigl(1-q^{n} \bigr) \\ &\quad=\frac{q^{a\binom{n}{2}}-q^{-a\binom {n}{2}}}{1+q^{an}}+a^{2} \bigl(1-q^{n} \bigr)[n]_{q} \Biggl(\mathop{\sum_{j=1}}_{2\mid j}^{n-1} \frac{j}{[j]_{q}}+\mathop{\sum_{j=1}}_{2\nmid j}^{n-1} \frac {n-j}{[j]_{q}} \Biggr) \ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3} \bigr). \end{aligned}$$
$$q^{an}= \bigl(1- \bigl(1-q^{n} \bigr) \bigr)^{a} \equiv1-a \bigl(1-q^{n} \bigr)+\binom{a}{2} \bigl(1-q^{n} \bigr)^{2}\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{3} \bigr) $$
$$\frac{1}{2-a(1-q^{n})}=\frac{1}{2}\frac{1}{1-a(1-q^{n})/2}\equiv\frac {1}{2} \bigl(1+a \bigl(1-q^{n} \bigr)/2 \bigr)\ \bigl(\operatorname{mod}\ \Phi_{n}(q)^{2}\bigr), $$
we have
$$\begin{aligned} \frac{q^{a\binom{n}{2}}-q^{-a\binom{n}{2}}}{1+q^{an}}&\equiv-\frac {a(n-1)(1-q^{n})+a(n-1)/2\cdot(1-q^{n})^{2}}{2-a(1-q^{n})} \\ &\equiv-\frac{a(n-1)}{2} \biggl( \bigl(1-q^{n} \bigr)+ \frac{a+1}{2} \bigl(1-q^{n} \bigr)^{2} \biggr)\ \bigl( \operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
Noting that
$$\begin{aligned} \mathop{\sum_{j=1}}_{2\mid j}^{n-1}\frac{j}{[j]_{q}}+\mathop{\sum _{j=1}}_{2\nmid j}^{n-1}\frac{n-j}{[j]_{q}} &=\mathop{\sum _{j=1}}_{2\mid j}^{n-1}\frac{j}{[j]_{q}}+\mathop{\sum _{j=1}}_{2\mid j}^{n-1}\frac{j}{[n-j]_{q}} \\ &=\mathop{\sum_{j=1}}_{2\mid j}^{n-1} \biggl(\frac{j}{[j]_{q}}+ \frac {jq^{j}}{[n]_{q}-[j]_{q}} \biggr) \equiv\frac{n^{2}-1}{4}(1-q)\ \bigl( \operatorname{mod}\ \Phi_{n}(q)\bigr), \end{aligned}$$
we have
$$\begin{aligned} &\sum_{k=0}^{n-1}(-1)^{k}q^{2a\binom{k+1}{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{2a}-q^{a(n^{2}-1)/4} \sum_{k=0}^{n-1}(-1)^{k}q^{a((n-1)/2-k)^{2}} \left .\begin{bmatrix}{n-1}\\{k} \end{bmatrix} \right ._{q}^{2a} \\ &\quad\equiv \biggl(-\binom{a(n-1)/2}{2}-\frac{a(a+1)(n-1)}{4}+\frac {a^{2}(n^{2}-1)}{4} \biggr) \bigl(1-q^{n} \bigr)^{2} \\ &\quad=\frac{a^{2}(n^{2}-1)}{8} \bigl(1-q^{n} \bigr)^{2}\ \bigl( \operatorname{mod}\ \Phi_{n}(q)^{3}\bigr). \end{aligned}$$
In view of (1.7), this concludes the proof of (1.8). □



The authors thank the anonymous referee for his (her) valuable comments and suggestions. The first and the third authors are supported by the foundation of Jiangsu Educational Committee (No. 14KJB110008) and National Natural Science Foundation of China (Grant No. 11401301). The second author is also supported by NNSF (Grant No. 11271185).

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

Department of Teaching Affairs, Nanjing Institute of Technology, Nanjing, 211167, People’s Republic of China
Department of Mathematics, Nanjing University, Nanjing, 210093, People’s Republic of China
Department of Mathematics and Physics, Nanjing Institute of Technology, Nanjing, 211167, People’s Republic of China


  1. Calkin, NJ: Factors of sums of powers of binomial coefficients. Acta Arith. 86, 17-26 (1998) MathSciNetMATHGoogle Scholar
  2. Cusick, TW: Recurrences for sums of powers of binomial coefficients. J. Comb. Theory, Ser. A 52, 77-83 (1989) MathSciNetView ArticleGoogle Scholar
  3. McIntosh, RJ: Recurrences for alternating sums of powers of binomial coefficients. J. Comb. Theory, Ser. A 63, 223-233 (1993) MathSciNetView ArticleMATHGoogle Scholar
  4. Perlstadt, MA: Some recurrences for sums of powers of binomial coefficients. J. Number Theory 27, 304-309 (1987) MathSciNetView ArticleMATHGoogle Scholar
  5. Gould, HW: Combinatorial Identities: A Standardized Set of Tables Listing 500 Binomial Coefficient Summations. Henry W. Gould, Morgantown (1972) MATHGoogle Scholar
  6. de Bruijn, NG: Asymptotic Methods in Analysis. Dover, New York (1981) MATHGoogle Scholar
  7. Andrews, GE, Askey, R, Roy, R: Special Functions. Cambridge University Press, Cambridge (1999) View ArticleMATHGoogle Scholar
  8. Morley, F: Note on the congruence \(2^{4n}\equiv(-1)^{n}(2n)!/(n!)^{2}\), where \(2n+1\) is a prime. Ann. Math. 9, 168-170 (1895) MathSciNetView ArticleMATHGoogle Scholar
  9. Pan, H: A q-analogue of Lehmer’s congruences. Acta Arith. 128, 303-318 (2007) MathSciNetView ArticleMATHGoogle Scholar
  10. Cai, T-X, Granville, A: On the residues of binomial coefficients and their products modulo prime powers. Acta Math. Sin. Engl. Ser. 18, 277-288 (2002) MathSciNetView ArticleMATHGoogle Scholar


© Liu et al. 2015