Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,15 @@
import sequtils
import bignum
proc sylverster(lim: Positive): seq[Int] =
result.add(newInt(2))
for _ in 2..lim:
result.add result.foldl(a * b) + 1
let list = sylverster(10)
echo "First 10 terms of the Sylvester sequence:"
for item in list: echo item
var sum = newRat()
for item in list: sum += newRat(1, item)
echo "\nSum of the reciprocals of the first 10 terms: ", sum.toFloat