login
The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 9.
9

%I #17 Feb 25 2018 21:44:06

%S 9,90,891,8918,89181,891802,8918027,89180271,891802702,8918027027,

%T 89180270270,891802702701,8918027027002,89180270270027,

%U 891802702700263,8918027027002637,89180270270026371,891802702700263702,8918027027002637027,89180270270026370262,891802702700263702622,8918027027002637026226

%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) = 9.

%C The sequence starts with a(1) = 9 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="/A299872/b299872.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.99*10^n, a(n) ~ 0.89*10^n. See A300000 for the proof. - _M. F. Hasler_, Feb 22 2018

%e 9 + 90 = 99 which is the concatenation of 9 and 9.

%e 9 + 90 + 891 = 990 which is the concatenation of 9, 9 and 0.

%e 9 + 90 + 891 + 8918 = 9908 which is the concatenation of 9, 9, 0 and 8.

%e From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 990 - 99 = 891, a(4) = 9908 - 990 = 8918, etc. - _M. F. Hasler_, Feb 22 2018

%o (PARI) a(n,show=1,a=9,c=a,d=[a])={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. A299865, ..., A299871 for variants with a(1) = 2, ..., 8.

%K nonn,base

%O 1,1

%A _Eric Angelini_ and _Jean-Marc Falcoz_, Feb 21 2018