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 41-50 of 66 results. Next

A343102 a(n) is the sum of the number of times the digits in n (without repetition) have appeared in the sequence.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 1, 2, 2, 2, 2, 2, 2, 2, 2, 19, 11, 8, 8, 8, 8, 8, 8, 14, 9, 11, 8, 8, 0, 1, 0, 0, 0, 8, 2, 16, 11, 10, 1, 1, 1, 2, 1, 10, 3, 17, 19, 10, 1, 1, 0, 1, 1, 9, 4, 20, 26, 14, 3, 5, 3, 2, 3, 11, 6, 21, 30, 15, 6, 4, 3, 5, 1, 10, 5, 31, 42, 24, 16, 15, 14, 14, 10
Offset: 0

Views

Author

Scott R. Shannon, Apr 05 2021

Keywords

Comments

The fixed points > 0 in the first one million terms are 10, 310, 341, 351, 514. It is likely no more exist.

Examples

			a(0) to a(9) = 0 as the digits 0 to 9 have not appeared in the sequence.
a(10) = 10 as 1 has not appeared while 0 has appeared ten times, thus a(10) = 0 + 10 = 10.
a(11) = 1 as the repetitions of 1 in 11 are ignored, and 1 has appeared once in the sequence.
a(12) = 2 as 1 has appeared twice while 2 has not appeared, thus a(12) = 2 + 0 = 2.
a(20) = 19 as 2 has appeared eight times while 0 has appeared eleven times, thus a(20) = 8 + 11 = 19.
a(22) = 8 as the repetitions of 2 in 22 are ignored, and 2 has appeared eight times in the sequence.
		

Crossrefs

Cf. A343103 (count all digits in n), A326834, A004207, A309261, A331162.

Programs

  • Mathematica
    Block[{a = {}, d = ConstantArray[0, 10]}, Do[AppendTo[a, Total@ Map[d[[If[# == 0, 10, #] ]] &, Union@ IntegerDigits[i]]]; Set[d, d + DigitCount[a[[i + 1]] ]], {i, 0, 87}]; a] (* Michael De Vlieger, Apr 05 2021 *)

A343103 a(n) is the sum of the number of times each digit in n (taken with repetition) has appeared in the sequence.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 2, 1, 2, 2, 2, 2, 2, 2, 19, 11, 16, 8, 8, 8, 9, 8, 12, 11, 11, 11, 9, 0, 0, 0, 1, 0, 4, 3, 16, 16, 10, 2, 2, 1, 4, 2, 6, 5, 17, 20, 14, 2, 4, 2, 5, 3, 6, 5, 22, 25, 23, 8, 9, 9, 10, 6, 11, 11, 19, 27, 22, 5, 6, 7, 10, 6, 8, 9, 25, 33, 29, 11, 10, 12, 14, 9
Offset: 0

Views

Author

Scott R. Shannon, Apr 05 2021

Keywords

Comments

The fixed points > 0 in the first one million terms are 10, 101, 194. It is likely no more exist.

Examples

			a(0) to a(9) = 0 as the digits 0 to 9 have not appeared in the sequence.
a(10) = 10 as 1 has appeared zero times and 0 has appeared ten times, thus a(10) = 0 + 10 = 10.
a(11) = 2 as 1 has appeared once in the sequence, and as 1 appears twice in 11, a(11) = 1 + 1 = 2.
a(12) = 2 as 1 has appeared twice and 2 has appeared zero times, thus a(12) = 2 + 0 = 2.
a(20) = 19 as 2 has appeared eight times and 0 has appeared eleven times, thus a(20) = 8 + 11 = 19.
a(22) = 16 as 2 has appeared eight times in the sequence, and as 2 appears twice in 22, a(22) = 8 + 8 = 16.
		

Crossrefs

Cf. A343102 (count only unique digits in n), A326834, A004207, A309261, A331162.

Programs

  • Mathematica
    Block[{a = {}, d = ConstantArray[0, 10]}, Do[AppendTo[a, Total@ Map[d[[If[# == 0, 10, #] ]] &, IntegerDigits[i]]]; Set[d, d + DigitCount[a[[i + 1]] ]], {i, 0, 87}]; a] (* Michael De Vlieger, Apr 05 2021 *)

A372075 a(1) = 1; thereafter a(n+1) is obtained by prepending the digit-sum of a(n) to a(n).

Original entry on oeis.org

1, 11, 211, 4211, 84211, 1684211, 231684211, 28231684211, 3828231684211, 493828231684211, 62493828231684211, 7062493828231684211, 777062493828231684211, 91777062493828231684211, 10191777062493828231684211, 10310191777062493828231684211
Offset: 1

Views

Author

N. J. A. Sloane, Jun 16 2024

Keywords

Examples

			a(4) = 4211 as a(3) = 211 which has digital sum 2 + 1 + 1 = 4. Concatenating 4 and 211 gives 4211. - _David A. Corneth_, Jun 16 2024
		

Crossrefs

Programs

  • Mathematica
    NestList[DigitSum[#]*10^IntegerLength[#] + # &, 1, 20] (* Paolo Xausa, Jun 16 2024 *)
  • PARI
    first(n) = {
    	my(res = vector(n));
    	res[1] = 1;
    	for(i = 2, n,
    		res[i] = sumdigits(res[i-1])*10^(#digits(res[i-1]))+res[i-1]
    	); res
    } \\ David A. Corneth, Jun 16 2024
    
  • Python
    from itertools import islice
    def A372075_gen(): # generator of terms
        yield (a:=1)
        while True: yield (a:=a+10**len(s:=str(a))*sum(map(int,s)))
    A372075_list = list(islice(A372075_gen(),20)) # Chai Wah Wu, Jun 16 2024

A036227 a(1) = 20; a(n+1) = a(n) + sum of decimal digits of a(n).

Original entry on oeis.org

20, 22, 26, 34, 41, 46, 56, 67, 80, 88, 104, 109, 119, 130, 134, 142, 149, 163, 173, 184, 197, 214, 221, 226, 236, 247, 260, 268, 284, 298, 317, 328, 341, 349, 365, 379, 398, 418, 431, 439, 455, 469, 488, 508, 521, 529, 545, 559, 578, 598, 620, 628, 644, 658
Offset: 1

Views

Author

Miklos SZABO (mike(AT)ludens.elte.hu)

Keywords

Comments

elements >= 109 can be found in A007618.

Crossrefs

Programs

  • Mathematica
    NestList[#+Total[IntegerDigits[#]]&,20,60] (* Harvey P. Dale, May 11 2014 *)

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A036233 Inverse Colombian function.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 5, 3, 5, 7, 3, 1, 5, 9, 7, 20, 3, 20, 1, 3, 5, 20, 9, 1, 7, 3, 31, 5, 3, 20, 31, 9, 5, 1, 3, 7, 20, 42, 31, 7, 9, 20, 5, 42, 1, 31, 3, 7, 53, 9, 31, 20, 3, 5, 7, 42, 53, 1, 9, 64, 31, 42, 20, 53, 3, 1, 5, 9, 7, 64, 75, 31, 1, 42, 5, 20, 9, 53, 7, 3, 64, 86, 75, 20
Offset: 1

Views

Author

Miklos SZABO (mike(AT)ludens.elte.hu)

Keywords

Comments

a(n) is the smallest x with n in the digit summing sequence starting with x.
Contains only self-numbers, see A003052.

Crossrefs

A098751 a(n+1) = a(n) + 10's complement of each of the digits of a(n); a(0) = 0.

Original entry on oeis.org

0, 10, 29, 38, 47, 56, 65, 74, 83, 92, 101, 129, 147, 165, 183, 201, 228, 246, 264, 282, 300, 327, 345, 363, 381, 399, 408, 426, 444, 462, 480, 498, 507, 525, 543, 561, 579, 588, 597, 606, 624, 642, 660, 678, 687, 696, 705, 723, 741, 759, 768, 777, 786, 795
Offset: 0

Views

Author

Eric Angelini, Oct 01 2004

Keywords

Comments

0 -> 10 because 0 + (10 - 0) = 10; 10 -> 29 because 10 + [(10 - 1) + (10 - 0)] = 29; 29 -> 38 because 19 + [(10 - 1) + (10 - 9)] = 38; ...

Crossrefs

Programs

  • Mathematica
    NestList[Total[10-IntegerDigits[#]]+#&,0,60] (* Harvey P. Dale, Jan 02 2014 *)

Extensions

More terms from Sam Alexander, Jan 06 2005

A112437 Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 12, 15, 21, 24, 30, 21, 21, 18, 24, 24, 27, 33, 36, 36, 39, 45, 45, 48, 51, 48, 48, 51, 48, 48, 54, 51, 45, 48, 48, 48, 51, 51, 48, 48, 48, 48, 54, 57, 57, 57, 57, 57, 60, 54, 51, 45, 42, 36, 39, 42, 42, 39, 45, 45, 42, 42, 42, 36, 36, 36, 39, 45
Offset: 1

Views

Author

Alexandre Wajnberg, Dec 11 2005

Keywords

Comments

Variation on Angelini's A112395. The sequence cycles at a(24)=36 and the loop has 104 terms. It is the same loop as in A112434 "Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 3"; the first term of this 6-loop is the 47th term of that 3-loop and the first term of that 3-loop is the 59th of this 6-loop. Computed by Gilles Sadowski.

Examples

			a(24)=36 because 1+8 + 2+4 + 2+4 + 2+7 + 3+3 = 36
		

Crossrefs

A123171 a(1) = 123, a(n) = sum of digits of all previous terms.

Original entry on oeis.org

123, 6, 12, 15, 21, 24, 30, 33, 39, 51, 57, 69, 84, 96, 111, 114, 120, 123, 129, 141, 147, 159, 174, 186, 201, 204, 210, 213, 219, 231, 237, 249, 264, 276, 291, 303, 309, 321, 327, 339, 354, 366, 381, 393, 408, 420, 426, 438, 453, 465, 480, 492, 507, 519, 534
Offset: 1

Views

Author

Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 02 2006

Keywords

Comments

a(1) = 123 a(2) = 1 + 2 + 3 = 6 a(3) = (1 + 2 + 3) + 6 = 12 a(4) = (1 + 2 + 3) + 6 + (1 + 2) = 15 a(5) = (1 + 2 + 3) + 6 + (1 + 2) + (1 + 5) = 21 a(6) = (1 + 2 + 3) + 6 + (1 + 2) + (1 + 5) + (2 + 1) = 24 a(7) = (1 + 2 + 3) + 6 + (1 + 2) + (1 + 5) + (2 + 1) + (2 + 4) = 30 ...
Essentially the same as A016052. - R. J. Mathar, Jun 18 2008

Crossrefs

Cf. A004207.

Programs

  • Mathematica
    s={123};sum=0;Do[sum=sum+Total[IntegerDigits[s[[-1]]]];AppendTo[s,sum],{n,54}];s (* James C. McMahon, Nov 16 2024 *)
  • PARI
    s=0; a=123; print1(a,","); for(n=1,100,dig=eval(Vec(Str(a)));s=s+sum(i=1,length(dig),dig[i]);print1(s,",");a=s)

Formula

a(n) = a(n-1) + sum of digits of a(n-1), a(1) = 123

A151942 Table of Self / Colombian numbers and their descendents.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 8, 12, 10, 7, 16, 15, 11, 14, 9, 23, 21, 13, 19, 18, 20, 28, 24, 17, 29, 27, 22, 31, 38, 30, 25, 40, 36, 26, 35, 42, 49, 33, 32, 44, 45, 34, 43, 48, 53, 62, 39, 37, 52, 54, 41, 50, 60, 61, 64, 70, 51, 47, 59, 63, 46, 55, 66, 68, 74, 75, 77, 57, 58, 73, 72, 56
Offset: 1

Views

Author

Carl R. White, Jul 13 2009

Keywords

Comments

Initially resembles a permutation of the integers, but this is not the case. 101 is the first number to appear twice, descending from both 91 and 100: 91 + 9+1 = 100 + 1+0+0 = 101

Crossrefs

First column of table is the Self numbers: A003052; First through eighth rows are A004207, A016052, A007618, A006507, A016096, A036227, A036228 respectively.

Formula

T(r,0) are those numbers not of form n + sum of digits of n (Self numbers)
T(r,c) = T(r,c-1) + sum of digits of T(r,c-1)

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
Previous Showing 41-50 of 66 results. Next