login
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
OFFSET
1,2
LINKS
E. Angelini, Smallest digit makes the difference [Cached copy, with permission]
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
Sequence in context: A154328 A112654 A362987 * A102695 A376314 A252481
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Jan 16 2014
STATUS
approved