login
A288946
Starting with a(1) = 1, a(n) = smallest nonnegative integer not yet in the sequence such that the first digit of a(n) is plus or minus one the last digit of a(n-1) plus or minus 1, with preference given +1 when possible. The digit 0 is not allowed.
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 81, 21, 22, 31, 23, 41, 24, 51, 25, 61, 26, 71, 27, 82, 32, 33, 42, 34, 52, 35, 62, 36, 72, 37, 83, 43, 44, 53, 45, 63, 46, 73, 47, 84, 54, 55, 64, 56, 74, 57, 85, 65, 66, 75, 67, 86, 76, 77, 87, 88, 91, 28, 92, 38, 93, 48, 94, 58, 95, 68, 96, 78, 97, 89, 811, 29, 812, 39, 813, 49
OFFSET
1,2
COMMENTS
If a(n-1) ends in 9, a(n) must begin with 8 (i.e., a forced decrease by 1).
EXAMPLE
9 is followed by 81 in the sequence since there is no larger digit and 8 has already been used.
CROSSREFS
Cf. A288945.
Sequence in context: A341909 A024663 A272360 * A237346 A193757 A246605
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Jun 19 2017
STATUS
approved