Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Jul 01 2017 08:04:00
%S 1,2,11,21,22,12,13,23,24,3,25,4,31,26,5,41,27,6,51,28,7,61,29,8,71,
%T 211,212,14,32,15,42,16,52,17,62,18,72,19,81,213,214,33,215,43,216,53,
%U 217,63,218,73,219,82,111,221,222,112,113,223,224,34,35,44,36,54
%N Starting with a(1) = 1, a(n) = smallest nonnegative integer not yet in the sequence such that the first digit of a(n) is the last digit of a(n-1) plus or minus 1, with preference given to -1 when possible. The digit 0 is not allowed.
%C If a(n-1) ends in 1, a(n) must begin with 2 (i.e., a forced increase by 1).
%C There are no numbers in the sequence with first digit 9.
%e 11 is followed by 21 in the sequence since it can't be followed by a number starting with 0.
%Y Cf. A288946.
%K nonn,base
%O 1,2
%A _Enrique Navarrete_, Jun 19 2017