Composite numbers k with no single digit factors whose factors are all substrings of k: Difference between revisions
Composite numbers k with no single digit factors whose factors are all substrings of k (view source)
Revision as of 10:34, 7 May 2022
, 2 years agoAdded Arturo implementation
Thundergnat (talk | contribs) m (Promote. multiple implementations, no questions) |
Drkameleon (talk | contribs) (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}}
|