Zsigmondy numbers: Difference between revisions
m
→{{header|Wren}}: Minor tidy though [7, 3] no longer works for 20 terms with first version.
Not a robot (talk | contribs) (Add SETL) |
m (→{{header|Wren}}: Minor tidy though [7, 3] no longer works for 20 terms with first version.) |
||
Line 1,115:
{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
Shows the first 20 terms for each radix set apart from [7, 1], [7, 3] and [7, 5] where I've had to limit the number of terms to 18 for now. This is because the 19th term is being calculated incorrectly due to 7^19 exceeding Wren's safe integer limit of 2^53
<syntaxhighlight lang="
import "./fmt" for Fmt
Line 1,167:
2 1 49 17 1441 19 37969 353 19729 421 24325489 481 609554401 10039 216001 198593 381405156481 12979 9536162033329 288961
Zsigmony(n, 7, 3) - first
4 5 79 29 4141 37 205339 1241 127639 341 494287399 2041 24221854021 82573 3628081 2885681 58157596211761 109117
Zsigmony(n, 7, 5) - first 18 terms:
Line 1,177:
{{libheader|Wren-seq}}
However, we can deal with integers of any size by switching to BigInt.
<syntaxhighlight lang="
import "./seq" for Lst
import "./fmt" for Fmt
|