Increasing gaps between consecutive Niven numbers: Difference between revisions
Increasing gaps between consecutive Niven numbers (view source)
Revision as of 17:47, 10 December 2023
, 6 months ago→{{header|Wren}}: Minor tidy
No edit summary |
m (→{{header|Wren}}: Minor tidy) |
||
Line 2,225:
{{libheader|Wren-fmt}}
Limited to Niven numbers up to 1 billion in order to finish in a reasonable time (a little under 2 minutes on my machine).
<syntaxhighlight lang="
var newSum // recursive
Line 2,267:
var g = n - pn
if (g > pg) {
pg = g
}
|