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,22 @@
$ include "seed7_05.s7i";
include "bigint.s7i";
include "bigrat.s7i";
const func bigInteger: nextSylvester (in bigInteger: prev) is
return prev * prev - prev + 1_;
const proc: main is func
local
var bigInteger: number is 2_;
var bigRational: reciprocalSum is 0_ / 1_;
var integer: n is 0;
begin
writeln("First 10 elements of Sylvester's sequence:");
for n range 1 to 10 do
writeln(number);
reciprocalSum +:= 1_ / number;
number := nextSylvester(number);
end for;
writeln("\nSum of the reciprocals of the first 10 elements:");
writeln(reciprocalSum digits 210);
end func;