Find the composite numbers k in base 10, that have no single digit prime factors and whose prime factors are all a substring of k.



Task
 Find and show here, on this page, the first ten elements of the sequence.


Stretch
 Find and show the next ten elements.




var e = Enumerator({|f|
 
    var c = (9.primorial)
    var a = (1..c -> grep { .is_coprime(c) })
 
    loop {
        var n = a.shift
 
        a.push(n + c)
        n.is_composite || next
 
        f(n) if n.factor.all {|p| Str(n).contains(p) }
    }
})
 
var count = 10
 
e.each {|n|
    say n
    break if (--count <= 0)
}