close
login
A287205
Starting with a(1)=1 and excluding the digit 0 in any term in the sequence, a(n)=smallest nonnegative integer not yet in the sequence such that a(n-1) and a(n) altogether have exactly one consecutive digit for at most one digit.
1
1, 12, 2, 11, 3, 22, 4, 33, 5, 44, 6, 55, 7, 66, 8, 77, 9, 88, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 91, 99, 121, 123, 32, 21, 124, 42, 23, 34, 43, 35, 52, 24, 45, 53, 36, 62, 25, 54, 46, 63, 37, 72, 26, 64, 47, 73, 38, 82, 27, 74, 48, 83, 39, 92, 28, 84, 49, 93, 112, 29, 94, 113
OFFSET
1,2
COMMENTS
Note that upon removing commas, strings such as 111 and 1122 are not allowed. That is why 111 is not in the sequence and 99 is not followed by 112. The digit 0 is also not allowed as defined in the name.
MATHEMATICA
a = {{1}}; Do[k = 1; While[Nand[! MemberQ[a, #], Count[Length /@ Split[a[[n - 1]]~Join~#], 2] == 1, ! MemberQ[#, 0]] &@ Set[d, IntegerDigits@ k], k++]; AppendTo[a, d], {n, 2, 74}]; FromDigits /@ a (* Michael De Vlieger, May 22 2017 *)
CROSSREFS
Cf. A283430.
Sequence in context: A099136 A215416 A264970 * A183729 A238718 A303782
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, May 21 2017
STATUS
approved