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.

Showing 1-6 of 6 results.

A326834 a(0) = 0; a(1) = 0; for n > 0, a(n) = the sum of the number of times each digit in a(n-1) has occurred from a(0) to a(n-2) inclusive.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 12, 3, 1, 3, 2, 2, 3, 3, 4, 1, 4, 2, 4, 3, 5, 1, 5, 2, 5, 3, 6, 1, 6, 2, 6, 3, 7, 1, 7, 2, 7, 3, 8, 1, 8, 2, 8, 3, 9, 1, 9, 2, 9, 3, 10, 22, 20, 25, 17, 15, 17, 18, 18, 20, 28, 21, 32, 28, 25, 25, 27
Offset: 0

Views

Author

Scott R. Shannon, Oct 20 2019

Keywords

Comments

This sequence sums the previous digits the same way as A309261, except that here digits in a(n-1) are not considered unique, so each digit in a(n-1) is summed regardless of the number of times it appears in a(n-1). This leads to this sequence being the same as A309261 up to a(66) = 22, after which they diverge.

Examples

			a(2) = 1, as a(1) = 0, and '0' has occurred one previous time in the sequence before a(1).
a(62) = 2, as a(61) = 9, and '9' has occurred two previous times. '2' has now occurred 10 times in the sequence.
a(66) = 22, as a(65) = 10, and '1' has occurred ten previous times, and '0' has occurred twelve previous times, and 10 + 12 = 22.
a(67) = 20, as a(66) = 22, and '2' has occurred ten previous times, and '2' has occurred ten previous times, and 10 + 10 = 20.
		

Crossrefs

Programs

  • Python
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        an, c = 0, Counter()
        while True:
            yield an
            s = str(an)
            an = sum(c[d] for d in s)
            c.update(s)
    print(list(islice(agen(), 82))) # Michael S. Branicky, Mar 24 2025

A328096 a(0) = 0; a(1) = 1; for n > 1, a(n) = number of terms between the two previous occurrences of a(n-1) if a(n-1) has appeared two or more times, otherwise a(n) = 0.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 2, 0, 1, 3, 0, 2, 4, 0, 2, 2, 0, 2, 1, 9, 0, 3, 11, 0, 2, 6, 0, 2, 2, 0, 2, 1, 12, 0, 3, 12, 2, 5, 0, 4, 26, 0, 2, 5, 5, 0, 3, 11, 24, 0, 3, 3, 0, 2, 10, 0, 2, 2, 0, 2, 1, 28, 0, 3, 11, 16, 0, 3, 3, 0, 2, 10, 16, 6, 47, 0, 5, 31, 0, 2, 8
Offset: 0

Views

Author

Scott R. Shannon, Oct 04 2019

Keywords

Comments

In the first 10000 terms the largest entry is 9040, which is the number of terms between the two appearances of 217. The longest run of nonzero values is 19, starting at a(9740) = 3 and ending at a(9758) = 6400. The smallest number not appearing is 258.

Examples

			a(3) = 1 as there is 1 term between a(3-1) = a(2) = 0 and a(0) = 0.
a(5) = 0 as there are no terms between a(5-1) = a(4) = 1 and a(3) = 1.
a(7) = 0 as a(7-1) = a(6) = 2 has only appeared once up to n = 7.
a(12) = 4 as there are 4 terms between a(12-1) = a(11) = 2 and a(6) = 2.
a(22) = 11 as there are 11 terms between a(22-1) = a(21) = 3 and a(9) = 3.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local t, j;
          if n<2 then n else t:= a(n-1);
            for j from 2 to n do
              if a(n-j)=t then return j-2 fi
            od; 0
          fi
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Oct 04 2019
  • Mathematica
    a = {0,1}; While[Length@a < 90, p = Flatten@ Position[Reverse@ a, Last@a, 1, 2]; AppendTo[a, If[ Length@p == 1, 0, p[[2]] - p[[1]] - 1]]]; a (* Giovanni Resta, Oct 04 2019 *)

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 *)

A380690 a(0) = 0; a(n) = the number of times a(n-1) has all digits in common with a previous term.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 12, 0, 12, 1, 13, 0, 13, 1, 14, 0, 14, 1, 15, 0, 15, 1, 16, 0, 16, 1, 17, 0, 17, 1, 18, 0, 18, 1, 19, 0, 19, 1, 20, 0, 20, 1, 21
Offset: 0

Views

Author

Sergio Pimentel, Jan 30 2025

Keywords

Comments

Every number should appear a limited number of times in the sequence as opposed as in A326834.

Examples

			a(24) = 2 since a(23) = 1 and previously there are two numbers that only have the digit '1': a(22) = 11 and a(2) = 1.
a(4062) = 113 since a(4061) = 112 and previously there are 113 occurrences of numbers that only have the digits '1' and '2' such as 12,21,112,121,122.
		

Crossrefs

Programs

A380745 a(0) = 0; a(n) = the number of times a(n-1) has the same digits in common with a previous term, in any permutation.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2
Offset: 0

Views

Author

Sergio Pimentel, Jan 31 2025

Keywords

Comments

To find a(n), let L be the multiset of the digits of a(n-1). Then a(n) is the number of terms a(i), 0 <= i <= n-2, which also have L as the multiset of its digits. - N. J. A. Sloane, Mar 27 2025

Examples

			a(43) = 1 since a(42) = 21 and previously there is only one number in the sequence that contains both a 1 and a 2.
a(104) = 3 since a(103) = 11 and previously there are 3 numbers in the sequence that contain two 1's.
a(9942) = 14 since a(9941) = 155 and previously there are 14 numbers in the sequence that contain one 1 and two 5's.
		

Crossrefs

Programs

Showing 1-6 of 6 results.