|
|
A299986
|
|
Lexicographic first sequence of nonnegative integers such that a(n) + a(n+1) has a digit 6, and no term occurs twice.
|
|
1
|
|
|
0, 6, 10, 16, 20, 26, 30, 31, 5, 1, 15, 11, 25, 21, 35, 27, 9, 7, 19, 17, 29, 32, 4, 2, 14, 12, 24, 22, 34, 28, 8, 18, 38, 23, 3, 13, 33, 36, 40, 46, 50, 56, 60, 66, 70, 76, 80, 81, 45, 41, 55, 51, 65, 61, 75, 71, 85, 77, 39, 37, 49, 47, 59, 57, 69, 67, 79, 82, 44, 42, 54, 52, 64, 62, 74, 72, 84, 78, 48, 58, 68, 88, 73, 43, 53, 63, 83, 86, 90, 96, 100
(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=6, 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
|
|
|
|