The series converges rather rapidly, to what seems to be 2:
i B(i) Pi(B(i)) partial sum
1 1 1 1
2 2 2 1.500000000000000
3 3 6 1.833333333333333
4 7 42 1.976190476190476
5 43 1806 1.999446290143964
6 1807 3263442 1.999999693575066
7 3263443 10650056950806 1.999999999999906
8 10650056950807 1.1342371305542 x 10^26 2.000000000000000
9 1.1342371305542 x 10^26 1.2864938683279 x 10^52 2.000000000000000
10 1.2864938683279 x 10^52 1.6550664732452 x 10^104 2.000000000000000
11 1.6550664732452 x 10^104 2.7392450308603 x 10^208 2.000000000000000
DEFDBL A-Z
total = 1
b = 1
prod = 1
termNo = 1
DO
termNo = termNo + 1
b = 1 + prod
prod = prod * b
total = total + 1 / b
PRINT USING "## ############### ############### #.###############"; termNo; b; prod; total
ct = ct + 1
LOOP
The program quickly crashes on an overflow in prod = prod * b.
|
Posted by Charlie
on 2008-02-22 11:35:19 |