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.

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