Evaluate the sum of reciprocals of double factorial of even nonnegative integers.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) + Chr(10)
n = 2: df = 2: tot = 1 / 2
For i = 4 To 300 Step 2
df = df * i
tot = tot + 1 / df
Next
Text1.Text = Text1.Text & crlf & tot & " done"
End Sub
finds numerically the value .648721270700128. But to this we must add 1, as the puzzle asks for inclusion of values for non-negative even numbers rather than for positive even numbers and the double factorial of zero is 1. So the actual value would be approximated by 1.648721270700128.
A Dictionary of Real Numbers, by Jonathan and Peter Borwein, identifies this as sqrt(e). Taking the square root of e verifies this is the case, as the book is catalogued by the portion after the decimal--the same value as found by the program.
|
Posted by Charlie
on 2018-06-22 13:10:49 |