cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240919 Sequence whose n-th term is the sum of the first n digits in the concatenation of the base 10-representation of the sequence.

This page as a plain text file.
%I A240919 #28 Jul 07 2023 13:35:00
%S A240919 9,10,10,11,11,12,13,14,15,16,18,19,22,23,27,28,33,34,40,41,49,50,59,
%T A240919 61,63,65,68,70,77,79,87,90,93,96,100,104,104,108,109,113,122,127,127,
%U A240919 132,141,147,148,154,157,163
%N A240919 Sequence whose n-th term is the sum of the first n digits in the concatenation of the base 10-representation of the sequence.
%C A240919 This is the unique sequence in base 10 with this property, aside from the trivial case of beginning this sequence with a(k)=0 for the first k terms.
%C A240919 The only possible nonzero values for a(1) and a(2) are 9 and 10, respectively. This is because a(1) must be a 1-digit number, while a(2) must equal the sum of its own first digit and a(1).
%C A240919 Likewise, for the analogous sequence in a different base b, the first two terms must be b-1 and b.
%C A240919 Essentially the same as A107975. - _R. J. Mathar_, Jul 07 2023
%H A240919 Anthony Zajac, <a href="/A240919/b240919.txt">Table of n, a(n) for n = 1..10000</a>
%e A240919 a(5) is the sum of the first 5 digits of "91010111112..." = 9 + 1 + 0 + 1 + 0 = 11.
%t A240919 a240919 = {};
%t A240919 Do[
%t A240919 Which[Length[a240919] <= 0, AppendTo[a240919, 9],
%t A240919   Length[a240919] == 1,
%t A240919   AppendTo[a240919,
%t A240919    First[First[a240919] +
%t A240919      IntegerDigits[First[Plus[a240919, a240919]]]]],
%t A240919   True, AppendTo[a240919,
%t A240919    Total[Take[Flatten[Map[IntegerDigits, a240919]], n]]]], {n,
%t A240919   10000}]; TableForm[
%t A240919 Transpose[
%t A240919   List[Range[Length[a240919]],
%t A240919    a240919]]] (* _Michael De Vlieger_, Aug 05 2014 *)
%o A240919 (PARI) lista(nn) = {v = vector(nn); v[1] = 9; v[2] = 10; vd = [9, 1, 0]; print1(v[1], ", ", v[2], ", "); for (n=3, nn, v[n] = sum(k=1, n, vd[k]); vd = concat(vd, digits(v[n])); print1(v[n], ", "););} \\ _Michel Marcus_, Aug 14 2014
%Y A240919 Cf. A004207, A016096, A061939, A065075, A107975.
%K A240919 nonn,base,easy
%O A240919 1,1
%A A240919 _Anthony Zajac_, Aug 02 2014