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.

A355438 Lucas(a(n)) is least Lucas number beginning with n.

Original entry on oeis.org

1, 0, 2, 3, 13, 23, 4, 14, 19, 24, 5, 10, 15, 39, 20, 25, 49, 6, 11, 35, 59, 16, 64, 21, 45, 69, 26, 50, 7, 31, 55, 12, 36, 60, 17, 151, 41, 65, 22, 156, 46, 70, 27, 94, 51, 252, 8, 32, 166, 56, 190, 13, 281, 37, 305, 61, 18, 85, 42, 109, 310, 66, 267, 23, 224, 47, 181, 71, 138, 339
Offset: 1

Views

Author

Michel Marcus, Jul 02 2022

Keywords

Crossrefs

Programs

  • PARI
    L(n) = real((2 + quadgen(5)) * quadgen(5)^n); \\ A000032
    isok(k, dn) = my(dk=digits(L(k))); if (#dk >= #dn, Vec(dk, #dn) == dn);
    a(n) = my(k=0, dn=digits(n)); while (!isok(k, dn), k++); k;
    
  • Python
    def aupton(nn):
        ans, f, g, k = dict(), 2, 1, 0
        while len(ans) < nn:
            sf = str(f)
            for i in range(1, len(sf)+1):
                if int(sf[:i]) > nn:
                    break
                if sf[:i] not in ans:
                    ans[sf[:i]] = k
            f, g, k = g, f+g, k+1
        return [int(ans[str(i)]) for i in range(1, nn+1)]
    print(aupton(70)) # Michael S. Branicky, Jul 08 2022

Formula

Trivially a(n) >= log_phi(n-1) for n > 1. Probably upper bounds are obtainable using the theory of linear forms in logarithms. - Charles R Greathouse IV, Jul 08 2022