The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A299971 Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 0, and no term occurs twice. 10

%I

%S 1,9,11,19,21,29,31,39,41,49,51,50,10,20,30,40,60,42,8,2,18,12,28,22,

%T 38,32,48,52,53,7,3,17,13,27,23,37,33,47,43,57,44,6,4,16,14,26,24,36,

%U 34,46,54,55,5,15,25,35,45,56,64,66,74,76,84,86,94,96,104,97

%N Lexicographic first sequence of positive integers such that a(n) + a(n+1) has a digit 0, and no term occurs twice.

%C It happens that from a(18) = 42 on, the sequence coincides with the "nonnegative variant" A299970. Indeed, n = 18 is the first index for which the same value occurs, and {a(n), 1 <= n < 18} U {0} = {A299970(n), 0 <= n < 18}. - _M. F. Hasler_, Feb 28 2018

%H Vincenzo Librandi, <a href="/A299971/b299971.txt">Table of n, a(n) for n = 1..2000</a>

%t 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 *)

%o (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}

%Y Cf. A299970 (analog with nonnegative terms), A299957 (analog with digit 1), A299972 .. A299979 (digit 2..9).

%Y Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

%K nonn,base

%O 1,2

%A _M. F. Hasler_ and _Eric Angelini_, Feb 22 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 17 09:32 EST 2020. Contains 330949 sequences. (Running on oeis4.)