|
|
A299982
|
|
Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice.
|
|
9
|
|
|
0, 2, 10, 11, 1, 19, 3, 9, 12, 8, 4, 16, 5, 7, 13, 14, 6, 15, 17, 25, 27, 35, 37, 45, 47, 55, 57, 63, 29, 23, 39, 33, 49, 43, 59, 53, 67, 54, 18, 24, 28, 34, 38, 44, 48, 64, 56, 26, 36, 46, 66, 58, 62, 20, 22, 30, 32, 40, 42, 50, 52, 60, 61, 21, 31, 41, 51, 69, 73, 79, 83, 89, 93, 99, 101, 71, 81, 91, 109, 92, 70
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
A permutation of the nonnegative integers.
|
|
LINKS
|
|
|
PROG
|
(PARI) a(n, f=1, d=2, 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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|