|
|
A283430
|
|
Starting with a(1) = 1, a(n) = smallest nonnegative integer not yet in the sequence such that the digits of a(n-1) and a(n) together are all distinct except for one digit that appears twice.
|
|
1
|
|
|
1, 10, 12, 2, 11, 3, 13, 14, 4, 22, 5, 15, 16, 6, 26, 20, 21, 17, 7, 27, 23, 24, 25, 28, 8, 18, 19, 9, 29, 32, 30, 31, 34, 35, 36, 37, 38, 39, 43, 40, 33, 41, 42, 45, 46, 47, 48, 49, 54, 50, 44, 51, 52, 53, 56, 57, 58, 59, 65, 60, 55, 61, 62, 63, 64, 67, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The terms a(5) = 11, a(6) = 3 are allowed since in both terms altogether the digit 1 appears twice. On the contrary, a(n-1) = 11, a(n) = 12 are not allowed since the digit 1 appears three times. Also a(n-1) = 11, a(n) = 22 are not allowed since two digits (not one) appear twice.
|
|
MATHEMATICA
|
L = {1}; While[Length[L] < 100, k=2; While[ MemberQ[L, k] || (d = Plus @@ DigitCount[{k, L[[-1]]}]; ! SubsetQ[{0, 1, 2}, d] || Count[d, 2] != 1), k++]; AppendTo[L, k]]; L (* Giovanni Resta, May 22 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,fini,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|