(12C) Find the Nth Harmonic number
|
04-20-2022, 01:03 PM
(This post was last modified: 04-20-2022 01:14 PM by Gamo.)
Post: #1
|
|||
|
|||
(12C) Find the Nth Harmonic number
Information about Harmonic Number
https://en.wikipedia.org/wiki/Harmonic_number Instead of calculating the sum of the reciprocals of the first N natural numbers n 1 + Σ (1/x) with this summation its easy to do on some calculator that already x=2 have this Summation Function with this program the computation speed is fast since it doesn't have to continue sum up all the needed reciprocals from 2 up to N ---------------------------------------------------- Example: Find 50th of the Harmonic Number 50 [R/S] display answer ≈ 4.499 ---------------------------------------------------- Program: Code:
Gamo Remark: The Summation Formular above can be use to test on Casio fx-911ex as shown above. |
|||
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 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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)