

A235828


a(1)=1; a(n+1) is the smallest number, not already used, containing two digits whose difference is the smallest digit of a(n).


1



1, 10, 11, 12, 21, 23, 13, 32, 20, 22, 24, 31, 34, 14, 43, 25, 35, 30, 33, 36, 41, 45, 15, 54, 26, 42, 46, 37, 47, 40, 44, 48, 51, 56, 16, 65, 27, 53, 52, 57, 38, 58, 49, 59, 50, 55, 61, 67, 17, 76, 28, 64, 62, 68, 39, 63, 69, 60, 66, 71, 78, 18, 87, 29, 75, 72, 79, 70, 77, 81, 89, 19, 98, 80, 88, 91, 100
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



EXAMPLE

a(2) = 10 because it is the smallest number containing two digits whose difference is 1.
a(3) = 11 because it is the smallest number containing two digits whose difference is 0.


MATHEMATICA

A = {1}; Do[d = Min@IntegerDigits@Last@A; k = 10; While[MemberQ[A, k]  ! MemberQ[ Abs[ Subtract @@@ Subsets[IntegerDigits@k, {2}]], d], k++]; AppendTo[A, k], {99}]; A (* Giovanni Resta, Jan 16 2014 *)


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



