A343927 a(1) = 1, a(2) = 2; for n>2, a(n) is the smallest positive integer not yet in the sequence which shares a digit with a(n-1) but not with a(n-2), and where a(n) contains at least one digit not in a(n-1).
1, 2, 20, 10, 13, 23, 24, 14, 15, 25, 26, 16, 17, 27, 28, 18, 19, 29, 32, 30, 40, 41, 12, 52, 35, 31, 21, 42, 34, 36, 56, 45, 43, 37, 57, 50, 60, 46, 47, 70, 80, 38, 39, 49, 48, 58, 51, 61, 62, 72, 71, 81, 68, 63, 53, 54, 64, 67, 73, 83, 82, 92, 59, 65, 76, 74, 84, 85, 75, 79, 69, 86, 78, 97, 90
Offset: 1
Examples
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.
Links
- Scott R. Shannon, Image of the first 500000 terms. The green line is a(n) = n.
Comments