Pretty crazy that H_n - ln(n) has a series expansion with rational coefficients except the constant term
by
0 subcomment
by mackeye
2 subcomments
> For small n we can directly implement the definition. For large n, the direct approach would be slow and would accumulate floating point error.
is there a reason the direct definition would be slow, if we cache the prior harmonic number to calculate the next?
by jcla1
3 subcomments
Interesting follow-up question: What is the distance between the set of harmonic numbers and the integers? i.e. is there a lower bound on the difference between a given integer and its closest harmonic number? If so, for which integer is this achieved?