OFFSET
1,3
COMMENTS
The sequence consists of numbers constructed from the combination of the six nonprime digits 0,1,4,6,8,9 without duplication of the digits. Hence there are 2^6 - 1 = 63 terms.
EXAMPLE
10 is in the sequence as both 1 and 0 are nonprime, all digits are distinct, and no permutation of those digits yields a smaller number (with no leading 0's).
14 is in the sequence as both 1 and 4 are nonprime, all digits are distinct, and no permutation of those digits yields a smaller number.
41 is not in the sequence as 14 is a permutation of its digits and is a smaller number.
189 is in the sequence, so its permutations 198, 819, 891, 918 and 981, all of which are larger, are not.
104689 is in the sequence as all digits are nonprime and distinct, and no permutation of those digits yields a smaller number (with no leading 0's).
MAPLE
sort(map(x-> parse(cat(`if`(nops(x)>1 and x[1]=0,
[x[2], x[1], x[3..-1][]], x)[])), [seq(combinat[choose]
([0, 1, 4, 6, 8, 9], i)[], i=1..6)]))[]; # Alois P. Heinz, Jan 27 2023
PROG
(Python)
import itertools
nums, combinations, flat_list = [0, 1, 4, 6, 8, 9], [], []
for r in range(len(nums)+1):
for combination in itertools.combinations(nums, r):
combinations.append(list(combination))
for var in range(len(combinations)):
subitems=""
if (len(combinations[var]) > 1 and combinations[var][0] == 0) :
combinations[var][0], combinations[var][1] = combinations[var][1], combinations[var][0]
for sub in combinations[var]:
subitems += str(sub)
flat_list.append(int(subitems))
print(sorted(set(flat_list)))
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Glen Gilchrist, Jan 20 2023
STATUS
approved