

A300000


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


11



1, 10, 99, 999, 9990, 99900, 999000, 9990000, 99900000, 999000000, 9990000000, 99899999991, 998999999919, 9989999999190, 99899999991900, 998999999918991, 9989999999189910, 99899999991899109, 998999999918991090, 9989999999189910900, 99899999991899108991, 998999999918991089910, 9989999999189910899100
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The sequence starts with a(1) = 1 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.
By definition, Sum_{k=1..n} a(k) = c(n) = concatenation of the first n digits of the sequence, therefore a(n) = c(n)  c(n1). For n > 2, this defines a(n) recursively, without the need for solving an implicit equation, as the definition might suggest.  M. F. Hasler, Feb 22 2018


LINKS

JeanMarc Falcoz, Table of n, a(n) for n = 1..300


FORMULA

a(n) = c(n)  c(n1), where c(n) is the concatenation of the first n digits. c(n) ~ 1.1*10^(n1), and a(n) ~ 0.999*10^(n1).  M. F. Hasler, Feb 22 2018


EXAMPLE

1 + 10 = 11 which is the concatenation of 1 and 1.
1 + 10 + 99 = 110 which is the concatenation of 1, 1 and 0.
1 + 10 + 99 + 999 = 1109 which is the concatenation of 1, 1, 0 and 9.
Otherwise said:
a(3) = concat(1,1,0)  (1 + 10) = 110  11 = 99,
a(4) = concat(1,1,0,9)  (11 + 99) = 1109  110 = 999,
a(5) = concat(1,1,0,9,9)  1109 = 11099  1109 = 9990,
a(6) = concat(1,1,0,9,9,9)  11099 = 99900, etc.  M. F. Hasler, Feb 22 2018


PROG

(PARI) a(n, show=1, a=1, 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


CROSSREFS

A299865, A299866, A299867, A299868, A299869, A299870, A299871 and A299872 show the same type of sequence but with a different start.
The partial sums (the sequence c(n) mentioned in the Comments) is A299301.
Sequence in context: A179555 A105694 A179557 * A213454 A000456 A138365
Adjacent sequences: A299997 A299998 A299999 * A300001 A300002 A300003


KEYWORD

nonn,base,nice,easy


AUTHOR

Eric Angelini, Feb 10 2018


STATUS

approved



