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.

A092400 Fixed point of the morphism 1 -> 1121211, 2 -> 1121212121211, starting from a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1
Offset: 1

Views

Author

Philippe Deléham, Mar 21 2004

Keywords

Comments

Length of n-th run of identical symbols in A051069.

Crossrefs

Programs

  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 1, 2, 1, 2, 1, 1}, 2 -> {1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1}})]}], {1}, 3] (* Robert G. Wilson v, Feb 26 2005 *)
  • Python
    from sympy import integer_log
    def A007417(n):
        def f(x): return n+x-sum(((m:=x//9**i)-2)//3+(m-1)//3+2 for i in range(integer_log(x,9)[0]+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m
    def A092400(n): return A007417(n)-A007417(n-1) if n>1 else 1 # Chai Wah Wu, Feb 16 2025

Formula

Sum_{k=1..n} a(k) = A007417(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4/3. - Amiram Eldar, Apr 11 2025

Extensions

More terms from Robert G. Wilson v, Feb 26 2005