OFFSET
1,2
COMMENTS
This is the digit sequence equivalent of the Enots Wolley sequence A336957. Like that sequence to avoid the sequence halting rapidly an additional rule is placed on a(n) - it must have as least one digit not in a(n-1). This implies a(n) cannot be a repdigit as otherwise a(n+1) would not exist. If this rule is removed then the sequence terminates after five terms: 1, 2, 20, 10, 11. The next term then does not exist as it must both contain and not contain the digit 1.
The sequence is probably infinite as any a(n) must contain at least two distinct digits, thus a(n+2) can have at most eight distinct digits. This implies that a(n+3) can always be created using a digit in a(n+2) and a digit not in a(n+2). However the behavior of the sequence as n gets very large is unknown.
LINKS
Scott R. Shannon, Image of the first 500000 terms. The green line is a(n) = n.
EXAMPLE
a(3) = 20 as this is the smallest unused positive integer that contains a digit in a(2) = 2 while not containing any digit in a(1) = 1.
a(4) = 10 as this is the smallest unused positive integer that contains a digit in a(3) = 20 while not containing any digit in a(2) = 2.
a(5) = 13 as this is the smallest unused positive integer that contains a digit in a(3) = 10, contains a digit not in a(3), while not containing any digit in a(3) = 20.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, May 17 2021
STATUS
approved