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.

A365738 a(n) = A365737(10^n).

Original entry on oeis.org

1, 3, 12, 32, 92, 292, 995, 3029, 9651, 31817
Offset: 0

Views

Author

Chai Wah Wu, Sep 17 2023

Keywords

Crossrefs

Programs

  • Python
    from bisect import bisect
    from sympy import totient
    def A365738(n):
        k = 10**n
        plist, qlist, c = tuple(-totient(i) for i in range(1,k+1)), [0]*(k+1), 0
        for i in range(k):
            qlist[a:=bisect(qlist,plist[i],lo=1,hi=c+1,key=lambda x:plist[x])]=i
            c = max(c,a)
        return c

Extensions

a(9) from Chai Wah Wu, Oct 13 2023