A345227 Lexicographically earliest infinite sequence of distinct positive numbers such that every block of ten consecutive digits starting from a(1) contains the digits 0 to 9.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 45, 67, 89, 12, 30, 46, 57, 98, 13, 20, 47, 56, 890, 14, 25, 36, 78, 90, 15, 24, 37, 68, 91, 26, 34, 50, 79, 80, 16, 27, 35, 48, 92, 17, 38, 40, 59, 60, 18, 29, 43, 65, 70, 19, 28, 53, 64, 71, 32, 49, 58, 607, 21, 39, 54, 76, 800, 31, 42, 69, 75, 81, 52, 63
Offset: 1
Examples
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.
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
Programs
-
PARI
See Links section.
Comments