Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
A300907
a(n) is the least positive integer not yet in the sequence in which the largest digit of a(n-2) appears among its digits; a(1)=1, a(2)=2.
3
1, 2, 10, 12, 11, 20, 13, 21, 3, 22, 23, 24, 30, 4, 31, 14, 32, 34, 33, 40, 35, 41, 5, 42, 15, 43, 25, 44, 45, 46, 50, 6, 51, 16, 52, 26, 53, 36, 54, 56, 55, 60, 57, 61, 7, 62, 17, 63, 27, 64, 37, 65, 47, 66, 67, 68, 70, 8, 71, 18, 72, 28, 73, 38, 74, 48, 75, 58, 76, 78, 77, 80
OFFSET
1,2
COMMENTS
Starting from the term a(89)=89, every term must contain a 9.
EXAMPLE
For n=5, a(n-2) = 10 which has largest digit 1. The positive integers containing 1 are 1, 10, 11, 12, 13, ... (A011531). Since 1 and 10 are already in the sequence, a(5) = 11. - Michael B. Porter, Mar 17 2018
MATHEMATICA
FromDigits /@ Nest[Function[a, Append[a, Block[{k = 3, d}, While[Nand[FreeQ[a, #], MemberQ[#, Max@ a[[-2]]]] &@ Set[d, IntegerDigits@ k], k++]; d]]], {{1}, {2}}, 70] (* Michael De Vlieger, Mar 16 2018 *)
CROSSREFS
Cf. A286890.
Sequence in context: A188283 A174703 A258081 * A327793 A276103 A101222
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Mar 14 2018
STATUS
approved