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.

A347306 When k appears in A347113, or -1 if k never appears.

Original entry on oeis.org

1, 8, 11, 2, 7, 9, 20, 12, 15, 3, 28, 13, 19, 10, 16, 21, 37, 17, 51, 23, 27, 4, 53, 24, 33, 14, 29, 34, 47, 25, 101, 30, 38, 22, 43, 31, 116, 18, 44, 39, 58, 45, 63, 48, 52, 5, 99, 49, 59, 54, 68, 60, 81, 55, 64, 50, 73, 35, 136, 56, 146, 26, 65, 69, 72, 66, 159, 74, 77, 70, 153
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2021

Keywords

Comments

It is conjectured that every positive number appears in A347113. - N. J. A. Sloane, Nov 08 2021

Crossrefs

Cf. A347113.

Programs

  • Mathematica
    With[{s = Import["https://oeis.org/A347113/b347113.txt", "Data"][[All, -1]]}, Array[FirstPosition[s, #][[1]] &, 71]] (* Michael De Vlieger, Sep 01 2021 *)
  • Python
    from math import gcd
    def A347306(n):
        if n == 1:
            return 1
        i, j, nset, m = 1, 2, {1}, 2
        while True:
            k = m
            i += 1
            while k == j or gcd(k,j) == 1 or k in nset:
                k += 1
            if k == n:
                return i
            j = k+1
            nset.add(k)
            while m in nset:
                m += 1 # Chai Wah Wu, Sep 02 2021