15 lines
328 B
Text
15 lines
328 B
Text
F sylverster(lim)
|
||
V result = [BigInt(2)]
|
||
L 2..lim
|
||
result.append(product(result) + 1)
|
||
R result
|
||
|
||
V l = sylverster(10)
|
||
print(‘First 10 terms of the Sylvester sequence:’)
|
||
L(item) l
|
||
print(item)
|
||
|
||
V s = 0.0
|
||
L(item) l
|
||
s += 1 / Float(item)
|
||
print("\nSum of the reciprocals of the first 10 terms: #.17".format(s))
|