OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Egyptian fraction
EXAMPLE
1/3 = 0.3333...
1/3 - 1/(3+300) = 0.3300330...
1/3 - 1/(3+300) + 1/(3+300+357946) = 0.3300357946549...
The sum is 0.3 300 357946 530619256259 ...
MAPLE
P:=proc(q, h) local a, b, c, d, n, t, z; a:=1/h; b:=length(h);
d:=h; print(d); t:=h; c:=1; for n from 1 to q do
z:=evalf(evalf(a+(-1)^c/(t+n), 100)*10^(b+ilog10(n)+1), 100);
z:=trunc(z-frac(z)); if z=d*10^(ilog10(n)+1)+n then b:=b+ilog10(n)+1;
d:=d*10^(ilog10(n)+1)+n; t:=t+n; a:=a+(-1)^c/(t); c:=c+1; print(n);
fi; od; end: P(10^20, 3);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Paolo P. Lava, Mar 20 2019
EXTENSIONS
a(4)-a(5) from Giovanni Resta, Mar 20 2019
STATUS
approved