login
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
OFFSET
1,2
COMMENTS
A permutation of the positive integers.
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
Cf. A299970 (analog with digit 0), A299957 (digit 1), A299973..A299979 (digit 3..9).
Sequence in context: A377042 A133236 A038322 * A334275 A090075 A004500
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, Feb 22 2018
STATUS
approved