login
A299983
Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 3, and no term occurs twice.
2
0, 3, 10, 13, 17, 6, 7, 16, 14, 9, 4, 19, 11, 2, 1, 12, 18, 5, 8, 15, 20, 23, 30, 33, 40, 43, 50, 53, 60, 63, 67, 26, 27, 36, 37, 46, 47, 56, 57, 66, 64, 29, 24, 39, 34, 49, 44, 59, 54, 69, 61, 22, 21, 32, 31, 42, 41, 52, 51, 62, 68, 25, 28, 35, 38, 45, 48, 55, 58, 65, 70, 73, 80, 83, 90, 93, 100, 103, 110, 113, 117, 76, 77, 86, 87, 96, 97, 106, 107
OFFSET
0,2
COMMENTS
A permutation of the nonnegative integers.
PROG
(PARI) a(n, f=1, d=3, 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. A299973 (analog with positive terms), A299957 (analog with digit 1), A299970, A299982, ..., A299988, A299969 (digit 0, 2, ..., 9).
Sequence in context: A174242 A022415 A344619 * A188373 A190776 A298418
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Feb 22 2018
STATUS
approved