OFFSET
1,2
COMMENTS
It happens that from a(18) = 42 on, the sequence coincides with the "nonnegative variant" A299970. Indeed, n = 18 is the first index for which the same value occurs, and {a(n), 1 <= n < 18} U {0} = {A299970(n), 0 <= n < 18}. - M. F. Hasler, Feb 28 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
MATHEMATICA
Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[k + #[[-1]], 10, 0] > 0], k++]; k]] &, {1}, 67] (* Michael De Vlieger, Feb 22 2018 *)
PROG
(PARI) a(n, f=1, d=0, a=1, u=[a])={for(n=2, n, f&&if(f==1, print1(a", "), write(f, n-1, " "a)); for(k=u[1]+1, oo, setsearch(u, k)&&next; setsearch(Set(digits(a+k)), d)&&(a=k)&&break); u=setunion(u, [a]); u[2]==u[1]+1&&u=u[^1]); a}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Feb 22 2018
STATUS
approved