Smarandache prime-digital sequence: Difference between revisions
Content added Content deleted
m (→{{header|zkl}}: add result) |
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Well, if everybody else is going overboard, I may as well too.) |
||
Line 163: | Line 163: | ||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
<lang perl6> |
<lang perl6>use Lingua::EN::Numbers::Cardinal; |
||
sub comma { $^i.flip.comb(3).join(',').flip } |
|||
# Implemented as a lazy, extendable list |
|||
my $spds = flat 2,3,5,7, (1..*).map: { grep { .is-prime }, [X~] |((2,3,5,7) xx $_), (3,7) }; |
my $spds = flat 2,3,5,7, (1..*).map: { grep { .is-prime }, [X~] |((2,3,5,7) xx $_), (3,7) }; |
||
say 'Smarandache prime-digitals:'; |
say 'Smarandache prime-digitals:'; |
||
⚫ | |||
⚫ | |||
{{out}} |
{{out}} |
||
<pre>Smarandache prime-digitals: |
<pre>Smarandache prime-digitals: |
||
First: 2 |
|||
Second: 3 |
|||
Third: 5 |
|||
Fourth: 7 |
|||
Fifth: 23 |
|||
Sixth: 37 |
|||
Seventh: 53 |
|||
Eighth: 73 |
|||
Ninth: 223 |
|||
Tenth: 227 |
|||
Eleventh: 233 |
|||
Twelfth: 257 |
|||
Thirteenth: 277 |
|||
Fourteenth: 337 |
|||
Fifteenth: 353 |
|||
Sixteenth: 373 |
|||
Seventeenth: 523 |
|||
Eighteenth: 557 |
|||
Nineteenth: 577 |
|||
Twentieth: 727 |
|||
Twenty-first: 733 |
|||
Twenty-second: 757 |
|||
Twenty-third: 773 |
|||
Twenty-fourth: 2,237 |
|||
24: 2237 |
|||
Twenty-fifth: 2,273 |
|||
25: 2273 |
|||
One hundredth: 33,223 |
|||
100: 33223</pre> |
|||
One thousandth: 3,273,527 |
|||
Ten thousandth: 273,322,727</pre> |
|||
=={{header|REXX}}== |
=={{header|REXX}}== |