Clear and documented solution. solution in Clear category for Numbers Factory by bsquare
# Creates the list of factors, working descending from higher digit '9' to '2',
# and iterating till all possible division are done.
# This way, we are sure to get the minimal factored number.
factor_list = 
for factor in range(9, 1, -1):
while not number % factor:
number //= factor
return 0 if number > 1 else int(''.join(map(str, sorted(factor_list))))
Sept. 18, 2019