Composite numbers k with no single digit factors whose factors are all substrings of k: Difference between revisions

Added Arturo implementation
m (Promote. multiple implementations, no questions)
(Added Arturo implementation)
Line 76:
5526173 11610313 13436683 13731373 13737841 13831103 15813251 17692313 19173071 28118827
</pre>
 
=={{header|Arturo}}==
 
<lang rebol>valid?: function [n][
pf: factors.prime n
every? pf 'f ->
and? [contains? to :string n to :string f]
[1 <> size digits f]
]
 
cnt: 0
i: new 3
 
while [cnt < 10][
if and? [not? prime? i][valid? i][
print i
cnt: cnt + 1
]
'i + 2
]</lang>
 
{{out}}
 
<pre>15317
59177
83731
119911
183347
192413
1819231
2111317
2237411
3129361</pre>
 
=={{header|F_Sharp|F#}}==
Line 110 ⟶ 143:
Real: 00:00:26.059
</pre>
 
=={{header|Go}}==
{{trans|Wren}}
1,532

edits