login
A299987
Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 7, and no term occurs twice.
2
0, 7, 10, 17, 20, 27, 30, 37, 33, 4, 3, 14, 13, 24, 23, 34, 36, 1, 6, 11, 16, 21, 26, 31, 39, 8, 9, 18, 19, 28, 29, 38, 32, 5, 2, 15, 12, 25, 22, 35, 40, 47, 50, 57, 60, 67, 70, 77, 80, 87, 83, 44, 43, 54, 53, 64, 63, 74, 73, 84, 86, 41, 46, 51, 56, 61, 66, 71, 76, 81, 89, 48, 49, 58, 59, 68, 69, 78, 79, 88, 82, 45, 42, 55, 52, 65, 62, 75, 72, 85, 90
OFFSET
0,2
COMMENTS
A permutation of the nonnegative integers.
PROG
(PARI) a(n, f=1, d=7, 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. A299977 (analog with positive terms), A299957 (analog with digit 1), A299970, A299982..A299988, A299969 (digit 0, 2..8, 9).
Sequence in context: A218128 A175666 A299997 * A192273 A098748 A020692
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Feb 22 2018
STATUS
approved