|
|
A299976
|
|
Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 6, and no term occurs twice.
|
|
1
|
|
|
1, 5, 11, 15, 21, 25, 31, 29, 7, 9, 17, 19, 27, 33, 3, 13, 23, 37, 24, 2, 4, 12, 14, 22, 34, 26, 10, 6, 20, 16, 30, 32, 28, 8, 18, 38, 48, 58, 68, 78, 82, 44, 42, 54, 52, 64, 62, 74, 72, 84, 76, 40, 36, 50, 46, 60, 56, 70, 66, 80, 81, 35, 41, 45, 51, 55, 61, 65, 71, 75, 85, 77, 39, 47, 49, 57, 59, 67, 69, 87, 73, 43, 53, 63, 83, 79, 86, 90, 96, 100
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A permutation of the positive integers.
|
|
LINKS
|
|
|
PROG
|
(PARI) a(n, f=1, d=6, a=1, u=[a])={for(n=2, 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
|
|
|
|