Ludic numbers: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed output format, optimized the function to be about twice as fast.) |
(→{{header|REXX}}: retroduce part of the program that was overlooked.) |
||
Line 2,888: | Line 2,888: | ||
if triples=='' | triples=="," then triples=250-1 /* " " " " " " */ |
if triples=='' | triples=="," then triples=250-1 /* " " " " " " */ |
||
say 'The first ' N " ludic numbers: " ludic(n) /*display title for what's coming next.*/ |
say 'The first ' N " ludic numbers: " ludic(n) /*display title for what's coming next.*/ |
||
$=ludic(count); @= |
|||
do j=1 until word($,j)>count; @=@ _; end /*only process up to a specific number.*/ |
|||
say |
|||
say "There are " words(@)-1 ' ludic numbers that are ≤ ' count |
|||
say |
say |
||
say "The " bot '───►' top ' (inclusive) ludic numbers are: ' subword(ludic(top),bot) |
say "The " bot '───►' top ' (inclusive) ludic numbers are: ' subword(ludic(top),bot) |
||
Line 2,920: | Line 2,924: | ||
<pre> |
<pre> |
||
The first 25 ludic numbers: 1 2 3 5 7 11 13 17 23 25 29 37 41 43 47 53 61 67 71 77 83 89 91 97 107 |
The first 25 ludic numbers: 1 2 3 5 7 11 13 17 23 25 29 37 41 43 47 53 61 67 71 77 83 89 91 97 107 |
||
There are 142 ludic numbers that are ≤ 1000 |
|||
The 2000 ───► 2005 (inclusive) ludic numbers are: 21475 21481 21487 21493 21503 21511 |
The 2000 ───► 2005 (inclusive) ludic numbers are: 21475 21481 21487 21493 21503 21511 |