[seqfan] Re: Suggested method to generate A004080 b-file

T. D. Noe noe at sspectra.com
Wed Jun 17 16:56:43 CEST 2009


At 10:16 AM -0400 6/17/09, David Wilson wrote:
>For you math package freaks out there:
>
>Equation (15) on http://mathworld.wolfram.com/HarmonicNumber.html
>
>gives a very good estimate of H_k, the kth harmonic number, specifically
>
>ln(k+1/2)+gamma+1/(24(k+1)^2) < H_k < ln(k+1/2)+gamma+1/(24k^2) [1]
>
>where gamma is the Euler-Mascheroni constant, which is known very
>accurately (to billions of digits).
>
>A004080(n) is the smallest k with H_k > n. The interval in [1], which is
>O(k^-3) in length, is extremely unlikely to straddle an integer for the
>large k in question. It should be sufficient to decide whether a given
>H_k is less than or greater than integer n. This is the basis of a
>binary or adaptive search algorithm for A004080(n), which would help us
>generate a b-file for that sequence.
>
>A good test would be A004080(100)
>= A099618(2)
>= 15092688622113788323693563264538101449859497


David, see A002387.

Tony





More information about the SeqFan mailing list