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.

A360600 Inverse permutation to A360599.

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 7, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 10, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, 95
Offset: 1

Views

Author

Rémy Sigrist, Feb 13 2023

Keywords

Examples

			A360599(59) = 42, so a(42) = 59.
		

Crossrefs

Cf. A360599.

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import islice
    def agen(): # generator of terms
        an, ratios, inv, n = 1, set(), dict(), 1
        while True:
            k = 1
            q, r = divmod(max(k, an), min(k, an))
            while r != 0 or q in ratios:
                k += 1
                q, r = divmod(max(k, an), min(k, an))
            an = k
            ratios.add(q)
            inv[q] = len(ratios)
            while n in inv:
                yield inv[n]
                n += 1
    print(list(islice(agen(), 67))) # Michael S. Branicky, Feb 13 2023