Smarandache prime-digital sequence: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: %V->%v, missing commas in fmts, plus it's gotten a touch slower somehow.) |
(Added Quackery.) |
||
Line 1,613: | Line 1,613: | ||
100 33223 |
100 33223 |
||
</lang> |
</lang> |
||
=={{header|Quackery}}== |
|||
<code>isprime</code> is defined at [[Primality by trial division#Quackery]]. |
|||
<lang Quackery> [ true swap |
|||
[ 10 /mod |
|||
[ table 1 1 0 0 1 0 1 0 1 1 ] |
|||
iff [ dip not ] done |
|||
dup 0 = until ] |
|||
drop ] is primedigits ( n --> b ) |
|||
[ temp put [] 0 |
|||
[ dup primedigits if |
|||
[ dup isprime if |
|||
[ dup dip join ] ] |
|||
1+ |
|||
over size temp share = until ] |
|||
drop ] is spds ( n --> [ ) |
|||
100 spds |
|||
25 split swap echo |
|||
cr cr |
|||
-1 peek echo</lang> |
|||
{{out}} |
|||
<pre>[ 2 3 5 7 23 37 53 73 223 227 233 257 277 337 353 373 523 557 577 727 733 757 773 2237 2273 ] |
|||
33223</pre> |
|||
=={{header|Raku}}== |
=={{header|Raku}}== |