Séminaire Lotharingien de Combinatoire 93 (2025), Article B93a

AN EASY PROOF OF RAMANUJAN’S FAMOUS CONGRUENCES p(5m + 4) ≡ 0 ≡ τ(5m + 5) (mod 5)

HARTOSH SINGH BAL AND GAURAV BHATNAGAR

Abstract. We present a proof of Ramanujan’s congruences

p(5n + 4) ≡ 0 (mod 5) and τ(5n + 5) ≡ 0 (mod 5). The proof only requires a limiting case of Jacobi’s triple product, a result that Ramanujan knew well, and a technique which Ramanujan used himself to compute values of τ(n).

1. Introduction

Let p(n) be the number of unordered partitions of a non-negative integer n. They are given by the generating function

P (q) = ∑_{n=0}^{∞} p(n)q^{n} = ∏_{k=1}^{∞} \frac{1}{1 − q^{k}} = \frac{1}{(1 − q)(1 − q^{2})(1 − q^{3}) ⋯}.

Similarly, Ramanujan’s τ function is defined by the generating function

∑_{n=0}^{∞} τ(n + 1)q^{n} = ∏_{k=1}^{∞}(1 − q^{k})^{24}.

The objective of this paper is to give a proof of Ramanujan’s congruences

p(5m + 4) ≡ 0 (mod 5) and τ(5m + 5) ≡ 0 (mod 5).

Ramanujan’s proof of the p(5m + 4) congruence appears in [10, Paper 25]; for his proof of the second congruence, see Berndt and Ono [6]. Our proof proves both at the same time; even so, it is easier.

We embed these in an infinite family of congruences. Let P_{r}(n) be defined using the equation

P (q)^{r} = ∑_{n=0}^{∞} P_{r}(n)q^{n},  (1.1)

where r is a rational number. In this notation P_{1}(n) = p(n) and P_{−24}(n) = τ(n + 1). We will show:

P_{r}(5m + 4) ≡ 0 (mod 5), if r ≡ 1 (mod 5),  (1.2)

where r is a rational number.^{1} The cases r = 1 and r = −24 give Ramanujan’s congruences.

2020 Mathematics Subject Classification. Primary: 11P83; Secondary: 05A17.

Key words and phrases. Partitions, Ramanujan’s τ function, congruences.

1In these congruences, a rational number a/b, with a and b relatively prime and b not divisible by 5, is understood as a · b^{−1}, where b^{−1} is the multiplicative inverse of b modulo 5.

The main ingredient of our proof is Jacobi’s identity, a limiting case of his triple product identity [5, p. 14],

P (q)^{−3} = ∏_{k=1}^{∞}(1 − q^{k})^{3} = ∑_{k=0}^{∞}(−1)^{k}(2k + 1)q^{\frac{k(k+1)}{2}} .  (1.3)

Ramanujan had rediscovered Jacobi’s result. In our notation, it can be rewritten as follows:

P_{−3}(n) = \begin{cases}(−1)^{k}(2k + 1), & if n = \frac{k(k+1)}{2}; \\ 0, & otherwise. \end{cases}  (1.4)

We mention that the result (1.2), and this proof, appears in the authors’ previous paper [1]. The objective of this note is to present the bare essentials of this proof.

2. The proof

We first prove a recurrence relation satisfied by the coefficients of powers of any generating function.

Lemma 2.1. Let P (q) be any power series, r and s be non-zero, real, numbers, and P_{r}(n) defined by (1.1). Then we have

∑_{k=0}^{n} (n − (r/s + 1)k)P_{r}(n − k)P_{s}(k) = 0.  (2.1)

Proof. We take the log derivatives on both sides of (1.1), and multiply by q, to obtain

r(q \frac{d}{dq} log P (q)) ∑_{n=0}^{∞} P_{r}(n)q^{n} = ∑_{n=0}^{∞} nP_{r}(n)q^{n}.

Similarly, we have

s(q \frac{d}{dq} log P (q)) ∑_{n=0}^{∞} P_{s}(n)q^{n} = ∑_{n=0}^{∞} nP_{s}(n)q^{n}.

This gives, on eliminating the common factor,

\frac{r}{s}( ∑_{n=0}^{∞} P_{r}(n)q^{n})( ∑_{n=0}^{∞} nP_{s}(n)q^{n}) = ( ∑_{n=0}^{∞} nP_{r}(n)q^{n})( ∑_{n=0}^{∞} P_{s}(n)q^{n})

The recurrence (2.1) follows by comparing coefficients of q^{n} on both sides. □

Remark. In this lemma, P (q) can be any generating function, and r and s any non-zero real or complex numbers, as long as P (q)^{r} and P (q)^{s} are formal power series. However, we will only apply it when P (q) is the generating function for partitions, and when r and s are rational numbers.

Proof of (1.2). We use an inductive argument using the recurrence relation (2.1), with s = −3, in the form

nP_{r}(n) = ∑_{j=1}^{∞}(−1)^{j+1}(2j + 1)(n + (r/3 − 1)j(j + 1)/2)P_{r}(n − j(j + 1)/2). (2.2)

Here we have used Jacobi’s result in the form (1.4) for P_{−3}(k).

Take n = 5m + 4. For m = 0, (2.2) reduces to

4P_{r}(4) = (9 + r)P_{r}(3) − 5(r + 1)P_{r}(2),

so P_{r}(4) ≡ 0 (mod 5) if r ≡ 1 (mod 5).

For m > 0, consider the general term

(−1)^{j+1}(2j + 1) (n + (r/3 − 1)j(j + 1)/2) P_{r}(n − j(j + 1)/2)

in (2.2) for each j. When j ≡ 1 (mod 5) it is of the form

(−1)^{j+1}(9 + r)P_{r}(∗∗) (mod 5),

and, when j ≡ 3 (mod 5), it is of the form

(−1)^{j+1}2(2r − 2)P_{r}(∗∗) (mod 5).

So, when r ≡ 1, these terms are 0 (mod 5). When j ≡ 2 (mod 5), then the expression is of the form

(−1)^{j+1}5(1 + r)P_{r}(∗∗) (mod 5);

clearly, it is divisible by 5. Finally, when j ≡ 4, 5 (mod 5), this reduces to an expression of the form

( ∗ ∗ ∗ )P_{r}(5m + 4 − 5k),

for some k > 0, and so is ≡ 0 (mod 5), by the induction hypothesis.

Thus each term of the sum on the right-hand side of (2.2) is 0 (mod 5). This completes the proof by induction. □

The following companions to (1.2) can be obtained from (2.2) by a similar proof:

P_{r}(5m + 1) ≡ 0 (mod 5) if r ≡ 0 (mod 5);  (2.3)
P_{r}(5m + 2) ≡ 0 (mod 5) if r ≡ 2 (mod 5);  (2.4)
P_{r}(5m + 3) ≡ 0 (mod 5) if r ≡ 4 (mod 5).  (2.5)

For further such congruences modulo 3, and some related results, see [1, 2].

3. Commentary

Taking log derivatives to obtain recurrences from generating functions is a standard procedure in generatingfunctionology, explained in Chapter 1 of Wilf [12]. It was one of Ramanujan’s favorite tricks. For example, we find the following recurrence in Ramanujan’s work (see [4, p. 108]):

∑_{d=1}^{n} σ(d)p(n − d) = np(n).

Here σ(n) is the sum of divisors of n. This can be obtained by log differentiation of P (q) and comparing coefficients. An extension was given by Ford [7]. See also Entries 12 and 13 in Chapter 10 of Ramanujan’s notebooks [3, pages 28–32] for some intricate examples illustrating Ramanujan’s use of log differentiation.

Ramanujan’s own recurrence for τ(n) is (2.2) (with r = −24); from this he computed 30 values of τ(n) in his seminal paper [11]. His proof uses log derivatives, and is along the lines of our proof of (2.1). Gould [8] credits an equivalent form of (2.1) to Rothe (1793). Lehmer [9] used Ramanujan’s ideas to compute more values of τ(n).

Interestingly, Ramanujan too considered congruence results for p(n) and τ(n) in tandem (see [6]); his proof of the τ(5n + 5) congruence uses the p(5n + 4) congruence. Here is a relation connecting τ(n) with p(n), obtained by taking s = 1 and r = −24 in (2.1):

∑_{k=0}^{n}(n + 23k)τ(n − k + 1)p(k) = 0.  (3.1)

References

[1] H. S. Bal and G. Bhatnagar. The Partition-frequency enumeration matrix. Ramanujan J., 59:51– 86, 2022.

[2] H. S. Bal and G. Bhatnagar. Glaisher’s divisors and infinite products. J. Integer Seq., 27(1):Paper No. 24.1.6, 22, 2024.

[3] B. C. Berndt. Ramanujan’s notebooks. Part II. Springer–Verlag, New York, 1989.

[4] B. C. Berndt. Ramanujan’s notebooks. Part IV. Springer–Verlag, New York, 1994.

[5] B. C. Berndt. Number theory in the spirit of Ramanujan, volume 34 of Student Mathematical Library. American Mathematical Society, Providence, RI, 2006.

[6] B. C. Berndt and K. Ono. Ramanujan’s unpublished manuscript on the partition and tau functions with proofs and commentary. The Andrews Festschrift (Maratea, 1998). Sém. Lothar. Combin., 42:Art. B42c, 63, 1999.

[7] W. B. Ford. Two theorems on the partitions of numbers. Amer. Math. Monthly, 38(4):183–184, 1931.

[8] H. W. Gould. Coefficient identities for powers of Taylor and Dirichlet series. Amer. Math. Monthly, 81:3–14, 1974.

[9] D. H. Lehmer. Ramanujan’s function τ(n). Duke Math. J., 10:483–492, 1943.

[10] S. Ramanujan. Collected papers of Srinivasa Ramanujan. AMS Chelsea Publishing, Providence, RI, 2000. Edited by G. H. Hardy, P. V. Seshu Aiyar and B. M. Wilson, Third printing of the 1927 original, With a new preface and commentary by Bruce C. Berndt.

[11] S. Ramanujan. On certain arithmetical functions [Trans. Cambridge Philos. Soc. 22 (1916), 159– 184]. In Collected papers of Srinivasa Ramanujan, pages 137–162. AMS Chelsea Publ., Providence, RI, 2000.

[12] H. S. Wilf. generatingfunctionology. A K Peters, Ltd., Wellesley, MA, third edition, 2006.

The Caravan, Jhandewalan Extn., New Delhi 110001, India

Email address: hartoshbal@gmail.com

RamanujanExplained.org, 18 Chitra Vihar, Delhi 110092, India

Email address: bhatnagarg@gmail.com
URL: https://gauravbhatnagar.org