SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • July 25, 2023
  • Rss Fetcher

For a positive integer n, the nth harmonic number is defined to be the sum of the reciprocals of the first n positive integers:

H_n = 1 + frac{1}{2} + frac{1}{3} + cdots + frac{1}{n}

How might we extend this definition so that n does not have to be a positive integer?

First approach

One way to extend harmonic numbers is as follows. Start with the equation

(t - 1)(t^{n-1} + t^{n-2} + t^{n-3} + cdots + 1) = t^n - 1

Then

frac{t^n - 1}{t-1} = t^{n-1} + t^{n-2} + t^{n-3} + cdots + 1

Integrate both sides from 0 to 1.

int_0^1frac{t^n - 1}{t-1} ,dt = frac{1}{n} + frac{1}{n-1} + frac{1}{n-2} + cdots + 1 = H_n

So when x is an integer,

H_x = int_0^1frac{t^x - 1}{t-1} ,dt

is a theorem. When x is not an integer, we take this as a definition.

Second approach

Another approach is to start with the identity

Gamma(x+1) = x, Gamma(x)

then take the logarithm and derivative of both sides. This gives

psi(x+1) = frac{1}{x} + psi(x)

where the digamma function ψ is defined to be the derivative of the log of the gamma function.

If x is an integer and we apply the identity above repeatedly we get

psi(n+1) = H_n + psi(1) = H_n - gamma

where γ is Euler’s constant. Then we can define

H_x = psi(x + 1) + gamma

for general values of x.

Are they equal?

We’ve shown two ways of extending the harmonic numbers. Are these two different extensions or are they equal? They are in fact equal, which follows from equation 12.16 in Whittaker and Watson, citing a theorem of Legendre.

Taking either approach as our definition we could, for example, compute the πth harmonic number (1.87274) or even the ith harmonic number (0.671866 + 1.07667i).

An addition rule

The digamma function satisfies an addition rule

psi(2z) = frac{1}{2} left( psi(z) + psileft(z + frac{1}{2}right)right) + log 2

 

which can be proved by taking the logarithm and derivative of Gauss’s multiplication rule for the gamma function.

Let z = x + 1/2 and add γ to both sizes. This shows that harmonic numbers satisfy the addition rule

H_{2x} = frac{1}{2}left( H_{x-1/2} + H_x right) + log 2

Related posts

  • Numerators of harmonic numbers
  • Computing harmonic numbers
  • Addition theorems

The post Extending harmonic numbers first appeared on John D. Cook.

Previous Post
Next Post

Recent Posts

  • Sage Unveils AI Trust Label to Empower SMB’s
  • How African Startups Are Attracting Global Fintech Funding
  • After its data was wiped, KiranaPro’s co-founder cannot rule out an external hack
  • Meet the Finalists: VivaTech’s 5 Most Visionary Startups of 2025
  • Trump fast-tracks supersonic travel, amid spate of flight-related executive orders

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • June 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.