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 23:04, 19 January 2022
, 2 years ago→{{header|Julia}}
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)
▲
end
seq = @>> Lazy.range(2) filter(containsitsonlytwodigfactors)
Line 31 ⟶ 34:
5526173 11610313 13436683 13731373 13737841 13831103 15813251 17692313 19173071 28118827
</pre>
=={{header|Raku}}==
|