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.

A379265 a(n) is the number of coincidences of the first n terms of this sequence and A379266, i.e., the number of equalities a(k) = A379266(k) for 0 <= k < n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 13, 13, 14, 14, 14, 14, 14, 15
Offset: 0

Views

Author

Pontus von Brömssen, Dec 19 2024

Keywords

Comments

a(n) appears to grow roughly like sqrt(n).

Crossrefs

Programs

  • Python
    def A379265_list(nterms):
        A = []
        A379266 = []
        for n in range(nterms):
            if n != 0:
                a += (a==A379266[-1])
            else:
                a = 0
            b = sum(1 for x,y in zip(A,reversed(A379266)) if x==y)
            A.append(a)
            A379266.append(b)
        return A

Formula

For n >= 1, a(n) = a(n-1)+1 if a(n-1) = A379266(n-1), otherwise a(n) = a(n-1).