Nice primes: Difference between revisions

Added Arturo implementation
m (→‎{{header|Phix}}: added syntax colouring the hard way)
(Added Arturo implementation)
Line 203:
{{output}}
<lang applescript>{509, 547, 563, 569, 587, 599, 601, 617, 619, 641, 653, 659, 673, 677, 691, 709, 727, 743, 761, 797, 821, 839, 853, 857, 887, 907, 911, 929, 941, 947, 977, 983, 997}</lang>
 
=={{header|Arturo}}==
 
<lang rebol>sumd: function [n][
s: sum digits n
(1 = size digits s)? -> return s
-> return sumd s
]
 
nice?: function [x] -> and? prime? x
prime? sumd x
 
loop split.every:10 select 500..1000 => nice? 'a ->
print map a => [pad to :string & 4]</lang>
 
{{out}}
 
<pre> 509 547 563 569 587 599 601 617 619 641
653 659 673 677 691 709 727 743 761 797
821 839 853 857 887 907 911 929 941 947
977 983 997</pre>
 
=={{header|AWK}}==
1,532

edits