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.




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
]