Let a
1=3/2 and a
n+1=a
2n−a
n+1.
Compute the sum 1/a1+1/a2+1/a3+….
Looks like the answer is 2
But I was not able to come up with an analytic method.
-----------
def f(n):
if n == 1:
return 3/2
return f(n-1)**2 - f(n-1) + 1
thesum = 0
for n in range(1, 14):
thesum += 1/f(n)
print(n, 1/f(n), thesum)
1 0.6666666666666666 0.6666666666666666
2 0.5714285714285714 1.2380952380952381
3 0.43243243243243246 1.6705276705276706
4 0.24782187802516942 1.9183495485528401
5 0.07548691107919238 1.9938364596320326
6 0.006125783851910988 1.9999622434839437
7 3.775509055601516e-05 1.9999999985744996
8 1.4255006807682198e-09 2.0000000000000004
9 2.03205219376735e-18 2.0000000000000004
10 4.1292361181946995e-36 2.0000000000000004
11 1.7050590919803628e-71 2.0000000000000004
12 2.9072265071448993e-142 2.0000000000000004
13 8.45196596384593e-284 2.0000000000000004
|
Posted by Larry
on 2024-02-05 08:33:44 |