How this calculator works
The nth harmonic number is the partial sum of reciprocal positive integers. Each added term is smaller than the previous one, but the unbounded harmonic series still diverges. A compensated summation reduces floating-point round-off when many small reciprocals are added. The output is a decimal approximation, not an exact rational fraction.
Formula
H₀ = 0. Hₙ = 1 + 1/2 + ... + 1/n. Hₙ₊₁ = Hₙ + 1/(n+1).
Worked example
H₃ = 1 + 1/2 + 1/3 = 11/6 ≈ 1.8333333333. Adding 1/4 gives H₄ = 25/12 ≈ 2.0833333333.
Advertisement
Frequently asked questions
Why accept n = 0?
The sum has no terms, so its value is zero. This convention makes the recurrence work from the start.
Does the harmonic series converge?
No. Its partial sums grow slowly without bound even though individual increments tend to zero.
Is the decimal exact?
Usually not. Reciprocals such as 1/3 repeat in decimal, and the calculator uses floating-point arithmetic with compensated summation.