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.

A383189 Inverse permutation to A383187 (diamond spiral numbers of a king moving on the infinite two-dimensional grid, not to the point numbered a(n)+-1).

Original entry on oeis.org

0, 3, 1, 6, 4, 15, 13, 2, 9, 7, 20, 5, 16, 35, 14, 31, 12, 10, 25, 8, 21, 42, 19, 17, 36, 63, 34, 32, 57, 30, 11, 26, 49, 24, 22, 43, 72, 41, 18, 37, 64, 99, 62, 33, 58, 91, 56, 29, 27, 50, 81, 48, 23, 44, 73, 110, 71, 40, 38, 65, 100, 143, 98, 61, 59, 92, 133, 90, 55, 28, 51, 82, 121, 80
Offset: 0

Views

Author

M. F. Hasler, May 12 2025

Keywords

Crossrefs

Cf. A383187 (inverse permutation).

Programs

  • Python
    def A383189(n):
        if not hasattr(A:=A383189, 'terms'): A.terms=[0]
        while len(t := A.terms) <= n:
           try: any(t.append(A383187.terms.index(k))for k in range(len(t), n+1))
           except: A383187(len(getattr(A383187,'terms',0)+100))
        return A.terms[n]