Sylvester's sequence: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
(Added Quackery.) |
||
Line 920: | Line 920: | ||
Sum of the reciprocals of the first 10 terms: |
Sum of the reciprocals of the first 10 terms: |
||
0.9999999999999999</pre> |
0.9999999999999999</pre> |
||
=={{header|Quackery}}== |
|||
<lang Quackery>[ $ "bigrat.qky" loadfile ] now! |
|||
' [ 2 ] 9 times [ dup -1 peek dup 2 ** swap - 1+ join ] |
|||
dup witheach [ echo cr ] cr |
|||
0 n->v rot witheach [ n->v 1/v v+ ] 222 point$ echo$</lang> |
|||
{{out}} |
|||
The first 222 digits after the decimal point are shown for the sum of reciprocals. |
|||
<pre>2 |
|||
3 |
|||
7 |
|||
43 |
|||
1807 |
|||
3263443 |
|||
10650056950807 |
|||
113423713055421844361000443 |
|||
12864938683278671740537145998360961546653259485195807 |
|||
165506647324519964198468195444439180017513152706377497841851388766535868639572406808911988131737645185443 |
|||
0.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999963493590798413 |
|||
Stack empty. |
|||
</pre> |
|||
=={{header|Raku}}== |
=={{header|Raku}}== |