Ramanujan and a Combinatorial Identity Involving Harmonic Numbers

Horst Alzer Morsbacher Straße 10 51545 Waldbröl Germany h.alzer@gmx.de

Man Kam Kwong Department of Applied Mathematics The Hong Kong Polytechnic University Hunghom, Hong Kong mankamkwong.math@outlook.com

Abstract We show that trigonometric series and integral formulas given by Ramanujan can be applied to deduce a new summation identity involving binomial coefficients and the classical harmonic number H_{n} = 1+1/2+⋯+1/n. Moreover, we prove that for n ≥ 2 the sum H_{2} + H_{3} + ⋯ + H_{n} is not an integer.

1 Introduction and statement of the main result

The work of Ramanujan had (and still has) tremendous influence on various fields, such as real analysis and number theory. The aim of this note is to show that certain trigonometric summation and integral formulas given by Ramanujan can be used to deduce a new combinatorial identity involving the well-known harmonic numbers

H_{0} = 0, H_{n} = ∑_{ν=1}^{n} \frac{1}{ν}, n = 1, 2, 3, ….

The properties of these numbers have been studied intensively by many authors. Ramanujan [2, p. 374] obtained a rapidly convergent series representation for the digamma function ψ = Γ′/Γ,

ψ(z + 1) + γ = \frac{1}{2z} − \frac{1}{2πz^{2}} + \frac{π cot(πz)}{e^{2πz} − 1} + ∑_{ν=1}^{∞} \frac{z^{2}}{ν(ν^{2} + z^{2})} + 4 ∑_{ν=1}^{∞} \frac{νz^{2}}{(e^{2πν} − 1)(ν^{4} − z^{4})},

where γ denotes Euler’s constant. Let n ≥ 1 be an integer. If z → n, then we obtain

H_{n} = \frac{1}{2n} − \frac{1}{2πn^{2}} + \frac{1 − (4πn + 1)e^{2πn}}{2n(e^{2πn} − 1)^{2}} + ∑_{ν=1}^{∞} \frac{n^{2}}{ν(ν^{2} + n^{2})} + 4 ∑_{{ν=1 \atop ν≠n}}^{∞} \frac{νn^{2}}{(e^{2πν} − 1)(ν^{4} − n^{4})}.

Lagarias [7] revealed a remarkable connection between harmonic numbers and the classical Riemann hypothesis. He proved that Riemann’s hypothesis is equivalent to

σ(n) < H_{n} + e^{H_{n}} log H_{n}, n = 2, 3, 4, …,

where σ(n) denotes the sum of divisors of n.

In the literature, we can find numerous interesting sums and series involving H_{n}. We give two examples:

∑_{ν=1}^{m}(−1)^{ν}\binom{m}{ν}\frac{ν(H_{n+ν} − H_{n})}{\binom{n+ν}{ν}} = \frac{m(m^{2} − m − n^{2})}{(m + n)^{2}(m + n − 1)^{2}}

and

∑_{ν=1}^{∞} \frac{\binom{2ν}{ν}2}{(2ν − 1)^{2}16^{ν}} H_{ν} = \frac{4}{π} (3 − 4 log 2);

see Choi [3], Chu [4], Chu and Donno [5], and Sofo [12].

Here is our main result.

Theorem 1. Let k and n be natural numbers with k ≤ n. Then

∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{n − 1} − \binom{n + k − ν − 1}{k − 1}\} H_{ν} = \binom{n + k}{k}(H_{k} − H_{n}).  (1.1)

Remark 1. When k = 1, (1.1) reduces to a particularly simple form:

∑_{ν=2}^{n} H_{ν} = (n + 1)(H_{n} − 1).  (1.2)

Remark 2. (ii) The referee pointed out the following noteworthy representation of the difference of two harmonic numbers, see [14]:

\frac{1}{\binom{n}{k}} ∑_{ν=1}^{k} \binom{n − ν}{n − k}\frac{1}{ν} = H_{n} − H_{n−k}, 1 ≤ k ≤ n.

Applications of (1.1) lead to the following closely related formulas.

Corollary 2. Let k and n be natural numbers with 2 ≤ k ≤ n. Then

∑_{ν=1}^{n+1} \{\binom{n + k − ν − 1}{n} − \binom{n + k − ν − 1}{k − 2}\} H_{ν}

= \binom{n + k}{k − 1}(H_{k} − H_{n+1}) − \frac{1}{n + 1}\binom{n + k}{k}.  (1.3)

Corollary 3. Let k and n be natural numbers with k ≤ n − 1. Then

∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{n − 2} − \binom{n + k − ν − 1}{k}\} H_{ν}

= \binom{n + k}{k + 1}(H_{k} − H_{n}) + \frac{1}{k + 1}\binom{n + k + 1}{k + 1}.  (1.4)

Obaid [8] presented an elegant counterpart of (1.1) which involves the famous Fibonacci numbers F_{n}:

∑_{ν=1}^{n}(−1)^{ν} \{\binom{n + k − ν − 1}{n − 1} − \binom{n + k − ν − 1}{k − 1}\} F_{ν} = (−1)^{n+1}F_{n−k}, 1 ≤ k ≤ n. (1.5)

With regard to (1.1) and (1.5) it is natural to ask: do there exist similar formulas if we replace H_{ν} or F_{ν} by other special combinatorial or number theoretical sequences?

Our proofs are given in the next section. In Section 3, we offer two additional results. Among others, we show that if n ≥ 2, then ∑_{ν=2}^{n} H_{ν} is not an integer.

2 Proofs

To prove Theorem 1 we need the following four lemmas. The first two formulas were given by Ramanujan; see Berndt [1, pp. 246, 290].

Lemma 4. Let a, N, and θ be real numbers with N ≥ 0 and |θ| ≤ π/2. Then

∑_{ν=0}^{∞} \binom{N}{ν} sin((a + 2ν)θ) = 2^{N} cos^{N}(θ) sin((a + N)θ).  (2.1)

Lemma 5. Let n be a positive integer. Then

∫_{0}^{π/2} x cos^{n}(x) sin(nx)dx = \frac{π}{2^{n+2}} H_{n}.  (2.2)

The next result is due to Rung and Obaid [11]. It has applications in the theory of boundary value problems. See also Obaid and Rung [9].

Lemma 6. Let k and n be integers with 1 ≤ k ≤ n and let θ be a real number. Then

∑_{ν=1}^{n} 2^{ν} \{\binom{n + k − ν − 1}{k − 1} − \binom{n + k − ν − 1}{n − 1}\} cos^{ν}(θ) sin(νθ)

= 2^{n+k} cos^{n+k}(θ) sin((n − k)θ).  (2.3)

Moreover, we need the following combinatorial identity which is given in Gould [6, p. 6].

Lemma 7. Let N be a nonnegative integer and let x be a real number with x ∉ {0, 1, …, N}. Then

∑_{ν=0}^{N} \frac{(−1)^{ν}}{x − ν} \binom{N}{ν} = \frac{(−1)^{N}}{(x − N)\binom{x}{N}}.  (2.4)

Proof of Theorem 1. Let 1 ≤ k ≤ n. We apply (2.1) with a = −2k, N = n + k. Then

∑_{ν=0}^{n+k} \binom{n + k}{ν} sin(2(ν − k)θ) = 2^{n+k} cos^{n+k}(θ) sin((n − k)θ).  (2.5)

Using (2.3) and (2.5) leads to

∑_{ν=0}^{n+k} \binom{n + k}{ν}θ sin(2(ν − k)θ)

= ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{k − 1} − \binom{n + k − ν − 1}{n − 1}\} 2^{ν}θ cos^{ν}(θ) sin(νθ).  (2.6)

Next, we integrate and apply the formula

∫_{0}^{π/2} θ sin(2pθ)dθ = (−1)^{p+1} \frac{π}{4p}, p ∈ ℤ \ \{0\}.

This gives

∫_{0}^{π/2} ∑_{ν=0}^{n+k} \binom{n + k}{ν}θ sin(2(ν − k)θ)dθ = ∫_{0}^{π/2} ∑_{{ν=0 \atop ν≠k}}^{n+k} \binom{n + k}{ν}θ sin(2(ν − k)θ)dθ

= ∑_{{ν=0 \atop ν≠k}}^{n+k} \binom{n + k}{ν} ∫_{0}^{π/2} θ sin(2(ν − k)θ)dθ

= −\frac{π}{4} ∑_{{ν=0 \atop ν≠k}}^{n+k} \frac{(−1)^{ν−k}}{ν − k} \binom{n + k}{ν}.  (2.7)

Using (2.2) yields

∫_{0}^{π/2} ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{k − 1} − \binom{n + k − ν − 1}{n − 1}\} 2^{ν}θ cos^{ν}(θ) sin(νθ)dθ
= \frac{π}{4} ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{k − 1} − \binom{n + k − ν − 1}{n − 1}\} H_{ν}.  (2.8)

From (2.6), (2.7) and (2.8) we conclude that

∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{k − 1} − \binom{n + k − ν − 1}{n − 1}\} H_{ν} = ∑_{{ν=0 \atop ν≠k}}^{n+k} \frac{(−1)^{ν−k}}{k − ν} \binom{n + k}{ν}.  (2.9)

We define

ϕ_{N}(x) = \binom{x}{N}, N ∈ ℕ, x ∈ ℝ.

Let k < N. Then

ϕ′_{N}(k) = \frac{(−1)^{N−k−1}}{(k + 1)\binom{N}{k+1}}, ϕ′′_{N}(k) = 2ϕ′_{N}(k) ∑_{{ν=0 \atop ν≠k}}^{N−1} \frac{1}{k − ν} .

From (2.4) we obtain

∑_{{ν=0 \atop ν≠k}}^{N} \frac{(−1)^{ν}}{x − ν} \binom{N}{ν} = \frac{(−1)^{N}}{(x − N)\binom{x}{N}} − \frac{(−1)^{k}}{x − k} \binom{N}{k}.

Using l’Hospital’s rule leads to

∑_{{ν=0 \atop ν≠k}}^{N} \frac{(−1)^{ν}}{k − ν} \binom{N}{ν} = lim_{x→k} (\frac{(−1)^{N}}{(x − N)\binom{x}{N}} − \frac{(−1)^{k}}{x − k} \binom{N}{k})
= \frac{(−1)^{k+1}}{k − N} \binom{N}{k} (1 + \frac{(k − N)ϕ′′_{N}(k)}{2ϕ′_{N}(k)})
= (−1)^{k+1}\binom{N}{k} (\frac{1}{k − N} + ∑_{{ν=0 \atop ν≠k}}^{N−1} \frac{1}{k − ν} ) .

We set N = n + k and obtain

∑_{{ν=0 \atop ν≠k}}^{n+k} \frac{(−1)^{ν}}{k − ν} \binom{n + k}{ν} = (−1)^{k}\binom{n + k}{k}(H_{n} − H_{k}).  (2.10)

From (2.9) and (2.10) we conclude that (1.1) holds.

Proof of Corollary 2. Let 2 ≤ k ≤ n. We define

T (k, n) = ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{n − 1} − \binom{n + k − ν − 1}{k − 1}\} H_{ν}.  (2.11)

Applying Pascal’s formula

\binom{N + 1}{ν} = \binom{N}{ν} + \binom{N}{ν − 1}

gives

T (k, n + 1) = ∑_{ν=1}^{n+1} \{\binom{n + k − ν − 1}{n} + \binom{n + k − ν − 1}{n − 1}\} H_{ν}

− ∑_{ν=1}^{n+1} \{\binom{n + k − ν − 1}{k − 1} + \binom{n + k − ν − 1}{k − 2}\} H_{ν}

= T (k, n) + ∑_{ν=1}^{n+1} \{\binom{n + k − ν − 1}{n} − \binom{n + k − ν − 1}{k − 2}\} H_{ν}.  (2.12)

From (1.1) we obtain

T (k, n + 1) − T (k, n) = \binom{n + k}{k − 1}(H_{k} − H_{n+1}) − \frac{1}{n + 1}\binom{n + k}{k}.  (2.13)

Combining (2.12) and (2.13) leads to (1.3). Proof of Corollary 3. Let 1 ≤ k ≤ n − 1 and let T (k, n) be the sum given in (2.11). Then

T (k + 1, n) = ∑_{ν=1}^{n} \{\binom{n + k − ν}{n − 1} − \binom{n + k − ν}{k}\} H_{ν}

= ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{n − 1} + \binom{n + k − ν − 1}{n − 2}\} H_{ν}

− ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{k} + \binom{n + k − ν − 1}{k − 1}\} H_{ν}

= T (k, n) + ∑_{ν=1}^{n} \{\binom{n + k − ν − 1}{n − 2} − \binom{n + k − ν − 1}{k}\} H_{ν}.  (2.14)

Using (1.1) gives

T (k + 1, n) − T (k, n) = \binom{n + k}{k + 1}(H_{k} − H_{n}) + \frac{1}{k + 1}\binom{n + k + 1}{k + 1}.  (2.15)

From (2.14) and (2.15) we conclude that (1.4) holds.

3 Additional results

There exists a kind of converse of Theorem 1. We use (1.1) with k = n − 1 and assume that (K_{ν})_{ν≥1} is a real or complex sequence. Then we obtain the following uniqueness theorem.

Theorem 8. If

∑_{ν=2}^{n} \{\binom{2n − ν − 2}{n − 1} − \binom{2n − ν − 2}{n − 2}\} K_{ν} = \binom{2n − 1}{n − 1}(K_{n−1} − K_{n})  (3.1)

holds for integers n ≥ 2, then there exists a constant λ such that

K_{r} = λH_{r}, r = 1, 2, ….  (3.2)

Proof. We consider two cases. \underline{Case 1.} K_{1} = 0. We use induction to prove that K_{r} = 0 for r ≥ 1. Let K_{1} = K_{2} = ⋯ = K_{r−1} = 0. From (3.1) with n = r ≥ 2 we obtain

−K_{r} = \binom{2r − 1}{r − 1}(−K_{r}).

Since \binom{2r−1}{r−1} > 1, we get K_{r} = 0. \underline{Case 2.} K_{1} ≠ 0. Since (3.1) remains valid, if we replace K_{j} by K_{j}/K_{1}, we may assume that K_{1} = 1. We show that (3.2) holds with λ = 1. Let K_{j} = H_{j} (j = 1, …, r − 1). Then we obtain from (3.1) with n = r:

∑_{ν=2}^{r−1} \{\binom{2r − ν − 2}{r − 1} − \binom{2r − ν − 2}{r − 2}\} H_{ν} + \{\binom{r − 2}{r − 1} − \binom{r − 2}{r − 2}\} K_{r}

= \binom{2r − 1}{r − 1}(H_{r−1} − K_{r}).  (3.3)

Since the solution of a linear equation is unique, we conclude from (1.1) (with n = r, k = r − 1) that (3.3) implies that K_{r} = H_{r}.

In 1915, Theisinger [13] proved that if n > 1, then H_{n} is not an integer. Kürschák offered an interesting extension. He showed that if 1 ≤ n < m, then the difference H_{m} − H_{n−1} is never an integer; see Pólya and Szegö [10, pp. 159, 381]. We apply (1.2) to prove the following related result.

Theorem 9. Let n ≥ 2 be a natural number. Then the sum ∑_{ν=2}^{n} H_{ν} is not an integer.

Proof. We define J_{n} = (n + 1)H_{n}. Then

J_{2} = \frac{9}{2} and J_{3} = \frac{22}{3}.

Let n ≥ 4. We assume that J_{n} is an integer. First, we show that there exists a prime number p such that n + 1 = 2p. We have

J_{n} = \frac{1}{n!} ∑_{ν=1}^{n} \frac{(n + 1)!}{ν}.

It follows that

n! | ∑_{ν=1}^{n} \frac{(n + 1)!}{ν}.

An application of Bertrand’s postulate gives that there exists a prime number p such that

[n/2] < p < n.

Since p | n!, we obtain

p | ∑_{ν=1}^{n} \frac{(n + 1)!}{ν}.  (3.4)

We have

p | \frac{(n + 1)!}{ν}, ν = 1, 2, …, p − 1, p + 1, …, n.  (3.5)

From (3.4) and (3.5) we conclude that

p | \frac{(n + 1)!}{p}.

This means that

p |1 · 2 ⋯ (p − 1) · (p + 1) ⋯ n · (n + 1).

It follows that there exists a number k ∈ {p + 1, …, n + 1} such that p|k. This implies that 2p ≤ n + 1. Otherwise, if n + 1 < 2p, then there exists a positive integer m with pm = k and

p ≤ pm = k ≤ n + 1 < 2p.

Thus, m = 1 and k = p. A contradiction. Hence 2p ≤ n + 1.

We assume that n is even. Let n = 2N. Then

N + 1 = [n/2] + 1 ≤ p ≤ \frac{n + 1}{2} = N + 1/2.

A contradiction. It follows that n is odd. Let n = 2N + 1. Then

N + 1 = [n/2] + 1 ≤ p ≤ \frac{n + 1}{2} = N + 1.

Thus, p = N + 1. This gives n + 1 = 2N + 2 = 2p.

We suppose that there exists a natural number n ≥ 4 such that J_{n} is an integer. Then n = 2p − 1. Here, p is an odd prime number. We have the representation

H_{n} = \frac{1}{2^{[log_{2}(n)]}} \frac{a_{n}}{b_{n}} ,

where a_{n} and b_{n} are odd integers. It follows that

J_{2p−1} = 2pH_{2p−1} = \frac{2p}{2^{[log_{2}(2p−1)]}} \frac{a_{2p−1}}{b_{2p−1}} = \frac{p}{2^{[log_{2}(2p−1)]−1}} \frac{a_{2p−1}}{b_{2p−1}} .

From

log_{2}(2p − 1) = \frac{log(2p − 1)}{log(2)} ≥ \frac{log(5)}{log(2)} > 2

we conclude that

[log_{2}(2p − 1)] ≥ 2.

Thus

J_{2p−1} = \frac{c_{2p−1}}{2^{r}b_{2p−1}} ,

where r is a natural number and c_{2p−1} = pa_{2p−1}, b_{2p−1} are odd integers. A contradiction. This implies that ∑_{ν=2}^{n} H_{ν} = J_{n} − (n + 1) is not an integer for all n ≥ 2.

4 Acknowledgment

We thank the referee for helpful comments.

References

[1] B. C. Berndt, Ramanujan’s Notebooks, Part 1, Springer, 1985.

[2] B. C. Berndt, Ramanujan’s Notebooks, Part 4, Springer, 1994.

[3] J. Choi, Summation formulas involving binomial coefficients, harmonic numbers, and generalized harmonic numbers, Abstr. Appl. Anal. (2014), Article 501906.

[4] W. Chu, Summation formulae involving harmonic numbers, Filomat 26 (2012), 143– 152.

[5] W. Chu and L. de Donno, Hypergeometric series and harmonic number identities, Adv. Appl. Math. 34 (2005), 123–137.

[6] H. W. Gould, Combinatorial identities. A standardized set of tables listing 500 binomial coefficient summations, 1972.

[7] J. Lagarias, An elementary problem equivalent to the Riemann hypothesis, Amer. Math. Monthly 109 (2002), 534–543.

[8] S. A. Obaid, Two new trigonometric formulas with applications, Appl. Math. Lett. 2 (1989), 367–370.

[9] S. A. Obaid and D. C. Rung, New mathematical identities with applications to flexure and torsion, J. Appl. Math. Phys. 40 (1989), 93–110.

[10] G. Pólya and G. Szegö, Aufgaben und Lehrsätze aus der Analysis II, Springer, 1971.

[11] D. C. Rung and S. A. Obaid, Combinatorics and flexure, J. Appl. Math. Phys. 36 (1985), 443–459.

[12] A. Sofo, Some more identities involving rational sums, Appl. Anal. Discr. Math. 2 (2008), 56–66.

[13] L. Theisinger, Bemerkung über die harmonische Reihe, Monatsh. Math. Phys. 26 (1915), 132–134.

[14] Binomial harmonic numbers, https://math.stackexchange.com/questions/
    2668419/binomial-harmonic-numbers.

2020 Mathematics Subject Classification: Primary 05A19; Secondary 11B83, 33B10. Keywords: combinatorial identity, harmonic number, trigonometric function.

(Concerned with sequence \underline{A001008} and \underline{A002805}.)

Received May 7 2026; revised versions received August 4 2026; August 5 2026. Published in Journal of Integer Sequences, August 14 2026.

Return to Journal of Integer Sequences home page.