Sylvester's sequence: Difference between revisions

m
added whitespace, split related tasks from "See also:".
m (→‎{{header|REXX}}: added whitespace and a comment.)
m (added whitespace, split related tasks from "See also:".)
Line 1:
{{draft task}}
{{Wikipedia|Sylvester's sequence}}
<br>
In number theory, '''Sylvester's sequence''' is an integer sequence in which each term of the sequence is the product of the previous terms, plus one.
 
Its values grow doubly exponentially, and the sum of its reciprocals forms a series of unit fractions that converges to 1 more rapidly than any other series of unit fractions with the same number of terms. Further, the sum of the first k terms of the infinite series of reciprocals provides the closest possible underestimate of 1 by any k-term Egyptian fraction.
 
In number theory, &nbsp; '''Sylvester's sequence''' &nbsp; is an integer sequence in which each term of the sequence is the product of the previous terms, &nbsp; plus one.
 
Its values grow doubly exponentially, &nbsp; and the sum of its reciprocals forms a series of unit fractions that converges to &nbsp; '''1''' &nbsp; more rapidly than any other series of unit fractions with the same number of terms. Further, the sum of the first k terms of the infinite series of reciprocals provides the closest possible underestimate of 1 by any k-term Egyptian fraction.
;Task
 
Further, the sum of the first &nbsp; '''k''' &nbsp; terms of the infinite series of reciprocals provides the closest possible underestimate of &nbsp; '''1''' &nbsp; by any &nbsp; k-term &nbsp; Egyptian fraction.
* Write a routine (function, procedure, generator, whatever) to calculate '''Sylvester's sequence'''.
 
* Use that routine to show the values of the first '''10''' elements in the sequence.
 
;Task:
* Write a routine (function, procedure, generator, whatever) to calculate '''Sylvester's sequence'''.
* Use that routine to show the values of the first '''10''' elements in the sequence.
* Show the sum of the reciprocals of the first '''10''' elements on the sequence;
 
 
;Related tasks:
;See also:
;:* &nbsp; [[Egyptian fractions]]
;:* &nbsp; [[Harmonic series]]
 
 
;* [[oeis:A000058|OEIS A000058 - Sylvester's sequence]]
;See also:
;* [[Egyptian fractions]]
;:* &nbsp; [[oeis:A000058|OEIS A000058 - Sylvester's sequence]]
;* [[Harmonic series]]
<br/><br>
 
=={{header|ALGOL 68}}==