Evaluate the sum of reciprocals of double factorial of even nonnegative integers.
DefDbl AZ
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 nonnegative 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 decimalthe same value as found by the program.

Posted by Charlie
on 20180622 13:10:49 