login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A054659
Increasing sequence with no repeating digits and no digits shared with previous term.
3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 40, 51, 60, 71, 80, 91, 203, 415, 602, 713, 802, 913, 2045, 3167, 4025, 6137, 8024, 9135, 20467, 31589, 40267, 51389, 60247, 81359
OFFSET
1,3
COMMENTS
a(11)=23 since a(10)=10 and any number from 11 to 21 would share a digit between the two terms while 22 has a repeated digit
PROG
(Python)
def ok(s, t): return len(set(t)) == len(t) and len(set(s+t)) == len(s+t)
def agen(): # generator of complete sequence of terms
an, MAX = 0, 987654321
while True:
if an < MAX: yield an
else: return
an, s = an+1, str(an)
MAX = 10**(10-len(s))
while an < MAX and not ok(s, str(an)): an += 1
print(list(agen())) # Michael S. Branicky, Jun 30 2022
CROSSREFS
Cf. A030283.
Sequence in context: A276766 A331215 A039229 * A331989 A120125 A345227
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Henry Bottomley, Apr 18 2000
STATUS
approved