Evaluate:
∞ n2 - 2
Σ ---------
n=1 (n+2)!
s=0;
for n=1:25
s=s+(n^2-2)/factorial(n+2);
fprintf('%3d %17.15f\n',[n s])
end
finds
1 -0.166666666666667
2 -0.083333333333333
3 -0.025000000000000
4 -0.005555555555556
5 -0.000992063492063
6 -0.000148809523810
7 -0.000019290123457
8 -0.000002204585538
9 -0.000000225468975
10 -0.000000020876757
11 -0.000000001766495
12 -0.000000000137649
13 -0.000000000009941
14 -0.000000000000669
15 -0.000000000000042
16 -0.000000000000002
17 -0.000000000000000
18 -0.000000000000000
19 0.000000000000000
20 0.000000000000000
21 0.000000000000000
22 0.000000000000000
23 0.000000000000000
24 0.000000000000000
25 0.000000000000000
indicating it approaches zero.
but if the numerator had not had the subtraction of 2 it would be the more interesting
s=0;
for n=1:25
s=s+(n^2)/factorial(n+2);
fprintf('%3d %17.15f\n',[n s])
end
finds
1 0.166666666666667
2 0.333333333333333
3 0.408333333333333
4 0.430555555555556
5 0.435515873015873
6 0.436408730158730
7 0.436543761022928
8 0.436561397707231
9 0.436563426928010
10 0.436563635695580
11 0.436563655127023
12 0.436563656778811
13 0.436563656908048
14 0.436563656917415
15 0.436563656918048
16 0.436563656918088
17 0.436563656918090
18 0.436563656918090
19 0.436563656918090
20 0.436563656918090
21 0.436563656918090
22 0.436563656918090
23 0.436563656918090
24 0.436563656918090
25 0.436563656918090
which Wolfram Alpha identifies 0.436563656918090 as 2*e - 5.
|
Posted by Charlie
on 2024-03-10 09:02:12 |