Harmonic Numbers
Harmonic numbers H(n) = 1 + 1/2 + 1/3 + … + 1/n represent the sum of reciprocals. Despite terms tending to zero, the series diverges slowly—like ln(n)—and is approximated by ln(n) + γ where γ is the Euler-Mascheroni constant.
Did our AI summary help? Let us know.
Nicole Oresme proved divergence in the 14th century by grouping terms. The Euler-Mascheroni constant γ is irrational and its exact value is unknown. H(n) is never an integer for n > 1 (proved by Tao, 2012).
Ready to run the numbers?
Why: Harmonic numbers appear in algorithm analysis (quicksort), probability (coupon collector), and number theory (prime counting).
How: Compute H(n) by summing 1/k or use the approximation ln(n)+γ for large n.
Run the calculator when you are ready.
Harmonic Numbers — The Slowly Diverging Series
H(n) = 1 + 1/2 + 1/3 + … + 1/n. Diverges like ln(n), approximated by ln(n) + γ.
Examples — Click to Load
For educational and informational purposes only. Verify with a qualified professional.
🧮 Fascinating Math Facts
γ ≈ 0.5772 appears in harmonic numbers, prime counting, and the Riemann zeta function.
Harmonic overtones in music follow the same 1, 1/2, 1/3 pattern as the harmonic series.
Key Takeaways
- • Hn = 1 + 1/2 + 1/3 + … + 1/n — the sum of reciprocals of the first n positive integers
- • The harmonic series diverges but extremely slowly — Hn grows without bound
- • ln(n) + γ approximates Hn well for large n
- • γ ≈ 0.5772 (Euler-Mascheroni constant) — one of mathematics's most mysterious numbers
Did You Know?
How Harmonic Numbers Work
The nth harmonic number Hn is defined as the sum of the reciprocals of the first n positive integers. As n grows, each new term 1/n becomes smaller, but the sum still increases without bound.
Definition
Hn = 1 + 1/2 + 1/3 + … + 1/n = Σk=1n 1/k
Asymptotic Approximation
For large n: Hn ≈ ln(n) + γ, where γ ≈ 0.5772156649. The error tends to 1/(2n) as n → ∞.
Divergence
Oresme's proof: group terms as 1, (1/2), (1/3+1/4), (1/5+…+1/8), … Each group is ≥ 1/2, so the sum exceeds any multiple of 1/2.
Expert Tips
ln(n) + γ Approximation
For n > 10, the approximation is accurate to within 1%. For n = 1000, the relative error is under 0.05%.
Coupon Collector
Expected trials to collect all n coupons is n·H_n. For n=20, that's about 72 trials on average.
Prime Counting
The sum of 1/p over primes p ≤ n is approximately ln(ln(n)) + M, where M is Meissel-Mertens constant.
Integral Comparison
H_n lies between ∫₁ⁿ⁺¹ (1/x) dx = ln(n+1) and 1 + ∫₁ⁿ (1/x) dx = 1 + ln(n).
Comparison: Manual vs Programming vs Lookup Table
| Feature | This Calculator | Manual Sum | Programming | Lookup Table |
|---|---|---|---|---|
| Exact H(n) for any n ≤ 1000 | ✅ | ❌ Impractical | ✅ | ⚠️ Limited n |
| ln(n)+γ approximation | ✅ | ❌ | ✅ | ❌ |
| Error analysis | ✅ | ❌ | ⚠️ Manual | ❌ |
| Charts & visualization | ✅ | ❌ | ❌ | ❌ |
| Educational content | ✅ | ❌ | ❌ | ❌ |
| Copy & share results | ✅ | ❌ | ❌ | ❌ |
Frequently Asked Questions
What is a harmonic number?
The nth harmonic number H_n is the sum 1 + 1/2 + 1/3 + … + 1/n. It represents the sum of reciprocals of the first n positive integers.
Does the harmonic series converge?
No. The harmonic series diverges — the sum grows without bound as n increases, though very slowly (like ln(n)).
What is the Euler-Mascheroni constant?
γ ≈ 0.5772 is the limit of (H_n - ln(n)) as n → ∞. It appears in many areas of mathematics including number theory and analysis.
How accurate is the ln(n) + γ approximation?
For large n, the error is approximately 1/(2n). For n=100, the error is about 0.005; for n=1000, about 0.0005.
Where do harmonic numbers appear in real life?
In the coupon collector problem (expected trials to collect all coupons), algorithm analysis (quicksort average case), and music (harmonic overtones).
Can H_n ever be an integer?
No. For n > 1, H_n is never an integer. This was proved by Tao in 2012 (and earlier by others).
What is the growth rate of H_n?
H_n grows like O(ln n). More precisely, H_n = ln(n) + γ + 1/(2n) - 1/(12n²) + …
Who first proved the harmonic series diverges?
Nicole Oresme (c. 1323–1382) gave the first known proof by grouping terms to show the sum exceeds any finite bound.
Infographic Stats
Official Sources
Disclaimer: This calculator is for educational purposes. Harmonic numbers have applications in mathematics, computer science, and physics. Results are exact for n ≤ 1000. The ln(n)+γ approximation is asymptotic; accuracy improves with larger n.
Related Calculators
Convolution Calculator
Convolution Calculator - Calculate and learn about sequences concepts
MathematicsFibonacci Calculator
Fibonacci Calculator - Calculate and learn about sequences concepts
MathematicsSum Of Series Calculator
Sum Of Series Calculator - Calculate and learn about sequences concepts
MathematicsSequence Arithmetic Calculator
Sequence Arithmetic Calculator - Calculate and learn about sequences concepts
MathematicsCollatz Conjecture Calculator
Collatz Conjecture Calculator - Calculate and learn about sequences concepts
MathematicsSequence Geometric Calculator
Sequence Geometric Calculator - Calculate and learn about sequences concepts
Mathematics