Ludic numbers: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
(Added Quackery.) |
||
Line 3,876: | Line 3,876: | ||
[233, 235, 239] |
[233, 235, 239] |
||
</pre> |
</pre> |
||
=={{header|Quackery}}== |
|||
<syntaxhighlight lang="Quackery"> [ [] |
|||
swap times [ i^ 1+ join ] |
|||
1 split |
|||
[ behead |
|||
rot over join unrot |
|||
over size over > while |
|||
temp put |
|||
[] swap |
|||
witheach |
|||
[ i^ 1+ |
|||
temp share mod |
|||
iff join else drop ] |
|||
temp release |
|||
again ] |
|||
drop join ] is ludic ( n --> [ ) |
|||
999 ludic |
|||
say "First 25 Ludic numbers: " |
|||
dup 25 split drop echo |
|||
cr cr |
|||
say "There are " |
|||
size echo |
|||
say " Ludic numbers less than 1000." |
|||
cr cr |
|||
25000 ludic |
|||
say "Ludic numbers 2000 to 2005: " |
|||
1999 split nip 6 split drop echo</syntaxhighlight> |
|||
{{out}} |
|||
<pre>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 less than 1000. |
|||
Ludic numbers 2000 to 2005: [ 21475 21481 21487 21493 21503 21511 ]</pre> |
|||
=={{header|Racket}}== |
=={{header|Racket}}== |