Closest harmonic number to an integer
The Endeavour 2025-11-20
Summary:
I mentioned in the previous post that the harmonic numbers Hn are never integers for n > 1. In the spirit of that post, I’d like to find the value of n such that Hn is closest to a given integer m. We have two problems to solve. First, how do we accurately and efficiently […]
The post Closest harmonic number to an integer first appeared on John D. Cook.