OFFSET
1,3
COMMENTS
This sequence is similar to A120125, with which it shares the first twenty-four terms, but has a more restrictive condition that every block of ten consecutive digits, beginning with a(1), must contains the digits 0 to 9. The sequence is also forced to be infinite, which means a number cannot be chosen for a(n) that would make it impossible for a(n+1) to exist. See the example below for a(64).
Numerous numbers cannot appear in the sequence as they would violate the requirement of ten consecutive unique digits. Any number with three or more equal consecutive digits cannot occur, nor can numbers with consecutive pairs of the same digit, e.g., 1122. However numbers with a single pair of equal consecutive digits can occur as the first digit may end a block of ten digits while the second digit may start the next. This is not a common occurrence so such numbers may not appear for many terms, e.g., a(4231) = 11.
When n becomes greater than 10^10 all numbers would be forced to consist of runs of the ten digits 0 to 9 in all possible orderings, leading to even greater restrictions on the possible terms. The behavior of the sequence in this regime is not known.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 511000 terms. The thin green line is a(n) = n.
Rémy Sigrist, PARI program
EXAMPLE
a(11) = 10. The first ten terms contain the digits 0 to 9 so a(11) begins the second block of ten digits so is free to choose any distinct digits that can form the lowest number not yet seen. The lowest such number is 10.
a(12) = 23 as a(11) used the digits 0 and 1, so the next lowest distinct number that can be created from the available digits 2 to 9 is 23.
a(16) = 12 as a(15) ended the second block of ten digits so a(16) is free to choose any distinct digits that can form the lowest number not yet seen. The lowest such number is 12.
a(25) = 890. This term ends the fourth block of ten unique digits and the only available digits to use are 8 and 9. But both 89 and 98 have previously appeared so the next lowest number possible is 890. This term uses the 0 digit in the fifth block of ten digits. This is the first term that differs from A120125.
a(64) = 607. This is the first time where a term is determined by the requirement that the next term must exist. As a(64) is written the three available digits are 0, 6 and 7. The number 67 has been used but 76 is available. But setting a(64) to 76 would force the next term to start with 0. As we do not allow 0 as a leading digit this would mean a(65) would not exist. Thus 76 cannot be chosen, and the next lowest number that can be created from 0, 6 and 7 that avoids leaving 0 as the only available digit is 607.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Jun 11 2021
STATUS
approved