A299971 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 0, and no term occurs twice.
1, 9, 11, 19, 21, 29, 31, 39, 41, 49, 51, 50, 10, 20, 30, 40, 60, 42, 8, 2, 18, 12, 28, 22, 38, 32, 48, 52, 53, 7, 3, 17, 13, 27, 23, 37, 33, 47, 43, 57, 44, 6, 4, 16, 14, 26, 24, 36, 34, 46, 54, 55, 5, 15, 25, 35, 45, 56, 64, 66, 74, 76, 84, 86, 94, 96, 104, 97
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Crossrefs
Programs
-
Mathematica
Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], DigitCount[k + #[[-1]], 10, 0] > 0], k++]; k]] &, {1}, 67] (* Michael De Vlieger, Feb 22 2018 *)
-
PARI
a(n,f=1,d=0,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}
Comments