%I #16 Feb 25 2018 21:44:06
%S 2,20,198,1981,19818,198179,1981783,19817838,198178379,1981783783,
%T 19817837830,198178378308,1981783783079,19817837830783,
%U 198178378307837,1981783783078363,19817837830783638,198178378307836379,1981783783078363783,19817837830783637836,198178378307836378362,1981783783078363783612
%N The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 2.
%C The sequence starts with a(1) = 2 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.
%H Jean-Marc Falcoz, <a href="/A299865/b299865.txt">Table of n, a(n) for n = 1..300</a>
%F a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.22*10^n, a(n) ~ 0.198*10^n. See A300000 for the proof. - _M. F. Hasler_, Feb 22 2018
%e 2 + 20 = 22 which is the concatenation of 2 and 2.
%e 2 + 20 + 198 = 220 which is the concatenation of 2, 2 and 0.
%e 2 + 20 + 198 + 1981 = 2201 which is the concatenation of 2, 2, 0 and 1.
%o (PARI) a(n,show=1,a=2,c=a,d=[c])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ _M. F. Hasler_, Feb 22 2018
%Y A300000 is the lexicographically first sequence of this type, with a(1) = 1.
%Y Cf. A299866, ..., A299872 for variants with a(1) = 3, ..., 9.
%K nonn,base
%O 1,1
%A _Eric Angelini_ and _Jean-Marc Falcoz_, Feb 21 2018
|