Palindromic primes: Difference between revisions

Content added Content deleted
(Added Arturo implementation)
Line 5: Line 5:
Find and show all palindromic primes &nbsp; <big>'''n'''</big>, &nbsp; &nbsp; where &nbsp; <big> '''n &nbsp; &lt; &nbsp; 1000''' </big>
Find and show all palindromic primes &nbsp; <big>'''n'''</big>, &nbsp; &nbsp; where &nbsp; <big> '''n &nbsp; &lt; &nbsp; 1000''' </big>
<br><br>
<br><br>

=={{header|Arturo}}==

<lang rebol>loop split.every: 10 select 2..1000 'x [
and? prime? x
x = to :integer reverse to :string x
] 'a -> print map a => [pad to :string & 4]</lang>

{{out}}

<pre> 2 3 5 7 11 101 131 151 181 191
313 353 373 383 727 757 787 797 919 929</pre>


=={{header|AWK}}==
=={{header|AWK}}==
Line 44: Line 56:
Palindromic primes 1-999: 20
Palindromic primes 1-999: 20
</pre>
</pre>

=={{header|Factor}}==
=={{header|Factor}}==
===Simple===
===Simple===