OFFSET
1,2
COMMENTS
The sequence ends with the LCM of {1, 2, 3, 4, 5, 6, 7, 8, 9} which is 2520 and we have a(1422) = 2520.
LINKS
Carole Dubois, Table of n, a(n) for n = 1..1422
EXAMPLE
The sequence starts with 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 30, 40, 33,... and we see indeed that a(10) cannot be 10 as the digit 1 of 10 would divide 9; in the same manner, a(10) = 11 is forbidden, as are 12, 13, 14, 15, 16, 17, 18, and 19; thus a(10) = 20; etc.
MATHEMATICA
Nest[Append[#, Block[{k = 2, n = #[[-1]]}, While[Nand[FreeQ[#, k], NoneTrue[DeleteCases[IntegerDigits@ k, 0], Mod[n, #] == 0 &]], k++]; k]] &, {1}, 84] (* Michael De Vlieger, Jun 06 2019 *)
CROSSREFS
KEYWORD
base,nonn,fini
AUTHOR
Eric Angelini and Carole Dubois, Jun 06 2019
STATUS
approved