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.

A249009 a(n+1) gives the number of occurrences of the first digit of a(n) so far, up to and including a(n), with a(0)=0.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Oct 18 2014

Keywords

Comments

Inspired by A248034.

Crossrefs

Cf. A249069 (analogous sequence in factorial base).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          coeff(b(n-1), x, convert(a(n-1), base, 10)[-1] ))
        end:
    b:= proc(n) option remember; `if`(n=0, 1, b(n-1)+
          add(x^i, i=convert(a(n), base, 10)))
        end:
    seq(a(n), n=0..120);
  • Python
    from itertools import islice
    def A249009_gen(): # generator of terms
        c, clist = 0, [1]+[0]*9
        while True:
            yield c
            c = clist[int(str(c)[0])]
            for d in str(c):
                clist[int(d)] += 1
    A249009_list = list(islice(A249009_gen(),100)) # Chai Wah Wu, Dec 13 2022