|
|
A299972
|
|
Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 2, and no term occurs twice.
|
|
11
|
|
|
1, 11, 9, 3, 17, 4, 8, 12, 10, 2, 18, 5, 7, 13, 14, 6, 15, 27, 25, 37, 35, 47, 45, 57, 55, 65, 56, 16, 26, 36, 46, 66, 54, 28, 24, 38, 34, 48, 44, 58, 62, 20, 22, 30, 32, 40, 42, 50, 52, 60, 61, 21, 31, 41, 51, 69, 23, 19, 33, 29, 43, 39, 53, 49, 63, 59, 64, 68
(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=2, 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
|
|
|
|