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.

A151413 Index at which n occurs in A160256, or -1 if n never occurs.

Original entry on oeis.org

1, 2, 3, 4, 14, 5, 20, 6, 7, 12, 32, 11, 301, 22, 16, 8, 1065, 9
Offset: 1

Views

Author

N. J. A. Sloane, May 16 2009

Keywords

Comments

After a(19) which exceeds 10^7 but is still unknown, the sequence continues 18,24,34,a(23)=?,10,215,303,... - M. F. Hasler, May 16 2009

Crossrefs

Programs

  • Python
    from sympy import gcd
    def A151413(n):
        if n <= 2:
            return n
        else:
            l1, l2, m, b = 2, 1, 1, {1, 2}
            for j in range(3, 10**9):
                i = m
                while True:
                    if not i in b:
                        if i == n:
                            return j
                        l1, l2, m = i, l1, l1//gcd(l1, i)
                        b.add(i)
                        break
                    i += m
            return "search limit reached." # Chai Wah Wu, Dec 09 2014

Formula

A160218(n) = a(A000040(n)), conjectured. - M. F. Hasler, May 16 2009

Extensions

a(13)-a(18) from Robert Gerbicz and M. F. Hasler, May 16 2009