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

m
Line 21:
using Primes
 
function containsitsonlytwodigfactors(n)
containsitsonlytwodigfactors(n) = (s = string(n); !isprime(n) && all(t -> length(t) > 1 && contains(s, t), map(x -> string(x), collect(keys(factor(n))))))
s = string(n)
containsitsonlytwodigfactors(n) = (s = string(n);return !isprime(n) && all(t -> length(t) > 1 && contains(s, t), map(x -> string(x), collect(keys(factor(n))))))
end
 
seq = @>> Lazy.range(2) filter(containsitsonlytwodigfactors)
Line 31 ⟶ 34:
5526173 11610313 13436683 13731373 13737841 13831103 15813251 17692313 19173071 28118827
</pre>
 
 
=={{header|Raku}}==
4,102

edits