OFFSET
1,2
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
def ok(n): return "".join(sorted(str(n))) in "123456789"
print([k for k in range(999) if ok(k)]) # Michael S. Branicky, Aug 04 2022
(Python) # alternate for generating full sequence instantly
from itertools import permutations
frags = ["123456789"[i:j] for i in range(9) for j in range(i+1, 10)]
afull = sorted(int("".join(s)) for f in frags for s in permutations(f))
print(afull[:70]) # Michael S. Branicky, Aug 04 2022
CROSSREFS
KEYWORD
nonn,base,easy,fini
AUTHOR
Omar E. Pol, Jun 15 2017
STATUS
approved