OFFSET
0,2
COMMENTS
A permutation of the nonnegative integers.
It happens that from a(50) = 50 on, this sequence coincides with the variant A299979 (starting at 1 and having only positive terms). Indeed the two sequences have the property that the terms a(0..49) resp. A299979(1..49) exactly contain all numbers from 0 to 49, respectively 1 to 49. - M. F. Hasler, Feb 28 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
MATHEMATICA
Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[#[[-1]] + k, 10, 9] > 0], k++]; k]] &, {0}, 90] (* Michael De Vlieger, Mar 01 2018 *)
PROG
(PARI) a(n, f=1, d=9, a=0, u=[a])={for(n=1, 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
Cf. A299979 (analog with positive terms), A299957 (analog with digit 1), A299970, A299982, ..., A299988 (digit 0, 2, ..., 8).
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Feb 22 2018
STATUS
approved