Post Reply 
(12C) Find the Nth Harmonic number
04-20-2022, 07:04 PM (This post was last modified: 11-13-2024 04:19 PM by Albert Chan.)
Post: #2
RE: (12C) Find the Nth Harmonic number
There was a thread about Harmonic numbers, Cut the cards

lua> n = 50
lua> x = n+0.5
lua> gamma = 0.5772156649015329

H(n) = Ψ(n+1) + gamma = Ψ((x=n+0.5) + 0.5) + gamma

(08-28-2020 09:26 PM)Albert Chan Wrote:  \(\qquad\qquad\exp( \psi(x+1/2)) = x
+\frac{1}{24 \cdot x
+\Large\frac{1}{\frac{10}{37} \cdot x
+\frac{1}{\frac{689976}{74381} \cdot x \;
+\; \cdots}}} \)

lua> h = log(x + 1/(24*x + 3.7/x)) + gamma
lua> h
4.499205338329271

Inverse-Harmonic, from h=H(n), to recover n

lua> k = exp(h - gamma)
lua> k - 1/(24*k + 2.7/k) - .5
49.99999999999862

There is a reason "recover" constant is 2.7. See if you can figure it out ...
Hint: 2.7 = 3.7 - 1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Find the Nth Harmonic number - Gamo - 04-20-2022, 01:03 PM
RE: (12C) Find the Nth Harmonic number - Albert Chan - 04-20-2022 07:04 PM



User(s) browsing this thread: 2 Guest(s)