Sylvester's sequence: Difference between revisions

Content added Content deleted
(Realize in F#)
Line 110: Line 110:
</pre>
</pre>


==={{header|F_Sharp|F#}}==
=={{header|F_Sharp|F#}}==
<lang fsharp>
<lang fsharp>
// Sylvester's sequence: Nigel Galloway. June 7th., 2021
// Sylvester's sequence: Nigel Galloway. June 7th., 2021
Line 134: Line 134:
27392450308603031423410234291674686281194364367580914627947367941608692026226993634332118404582438634929548737283992369758487974306317730580753883429460344956410077034761330476016739454649828385541500213920806
27392450308603031423410234291674686281194364367580914627947367941608692026226993634332118404582438634929548737283992369758487974306317730580753883429460344956410077034761330476016739454649828385541500213920806
</pre>
</pre>

=={{header|Factor}}==
=={{header|Factor}}==
Note that if the previous element of the sequence is x, the next element is x<sup>2</sup>-x+1.
Note that if the previous element of the sequence is x, the next element is x<sup>2</sup>-x+1.