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.

Previous Showing 11-12 of 12 results.

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.

Original entry on oeis.org

9, 10, 10, 11, 11, 12, 13, 14, 15, 16, 18, 19, 22, 23, 27, 28, 33, 34, 40, 41, 49, 50, 59, 61, 63, 65, 68, 70, 77, 79, 87, 90, 93, 96, 100, 104, 104, 108, 109, 113, 122, 127, 127, 132, 141, 147, 148, 154, 157, 163
Offset: 1

Views

Author

Anthony Zajac, Aug 02 2014

Keywords

Comments

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.
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).
Likewise, for the analogous sequence in a different base b, the first two terms must be b-1 and b.
Essentially the same as A107975. - R. J. Mathar, Jul 07 2023

Examples

			a(5) is the sum of the first 5 digits of "91010111112..." = 9 + 1 + 0 + 1 + 0 = 11.
		

Crossrefs

Programs

  • Mathematica
    a240919 = {};
    Do[
    Which[Length[a240919] <= 0, AppendTo[a240919, 9],
      Length[a240919] == 1,
      AppendTo[a240919,
       First[First[a240919] +
         IntegerDigits[First[Plus[a240919, a240919]]]]],
      True, AppendTo[a240919,
       Total[Take[Flatten[Map[IntegerDigits, a240919]], n]]]], {n,
      10000}]; TableForm[
    Transpose[
      List[Range[Length[a240919]],
       a240919]]] (* Michael De Vlieger, Aug 05 2014 *)
  • 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

A292512 Sequence A: Start with n, add the sum of digits of n (A062028) and repeat. Sequence B: Start with n, add the sum of base-100 digits of n and repeat. a(n) is the smallest common number > n.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 221, 341, 24, 109, 218, 30, 1171, 173, 36, 406, 80, 84, 88, 851, 96, 163, 104, 54, 218, 346, 120, 628, 1171, 231, 173, 181, 72, 197, 406, 213, 538, 260, 237, 1003, 1705, 90, 184, 719, 1041, 1015, 365, 111, 320, 127, 117, 418, 488, 114, 1487, 137, 120, 122, 199, 126, 1171, 298, 231, 134, 677
Offset: 1

Views

Author

Peter Weiss, Sep 18 2017

Keywords

Comments

If you start with n=1 and take a third sequence C (n + sum of base-1000 digits of n), the first common numbers of the three sequences are 2, 4, 8, 16 and 1027975.
The common numbers for the first ten primes are:
2 -> 4, 8, 16, 1027975, ...
3 -> 24, 96, 60342, ...
5 -> 10, 469534, ...
7 -> 14, 131558, ...
11 -> 923428, ...
13 -> 668495, ...
17 -> 81820, ...
19 -> 2061797, ...
23 -> 2227118, ...
29 -> 12278, ...

Examples

			n=10: Sequence A: 10, 11, 13, 17, 25, 32, 37, 47, 58, 71, 79, 95, 109, 119, 130, 134, 142, 149, 163, 173, 184, 197, 214, 221, ...
Sequence B: 10, 20, 40, 80, 160, 221, ...
-> 221 is the first common number > 10, so a(n)=221.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 10^3}, Table[With[{A = Rest@ NestList[# + Total@ IntegerDigits@ # &, n, m]}, NestWhile[# + Total@ IntegerDigits[#, 100] &, n, FreeQ[A, #] &, 1, m]], {n, 68}]] (* Michael De Vlieger, Sep 23 2017 *)
  • PARI
    a(n) = my (A=n + sumdigits(n), B=n + sumdigits(n,100)); while (1, if (A==B, return (A), ARémy Sigrist, Sep 23 2017
Previous Showing 11-12 of 12 results.