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.

A383186 Inverse permutation to A383185 (square spiral numbers of king filling the two-dimensional grid always crossing the spiral's wall).

Original entry on oeis.org

0, 5, 3, 1, 10, 25, 8, 6, 19, 17, 4, 15, 13, 2, 11, 30, 28, 26, 9, 24, 22, 7, 20, 18, 43, 41, 74, 16, 14, 37, 35, 33, 12, 31, 29, 60, 58, 27, 56, 54, 23, 52, 50, 48, 21, 46, 44, 42, 79, 77, 75, 40, 73, 38, 36, 69, 67, 34, 65, 32, 63, 61, 59, 100, 98, 147, 57, 55, 94, 53, 51, 90, 88, 49, 86
Offset: 0

Views

Author

M. F. Hasler, May 12 2025

Keywords

Crossrefs

Cf. A383185.

Programs

  • Python
    def A383186(n):
        if not hasattr(A:=A383186, 'terms'): A.terms=[0]; A.N=1
        while len(t := A.terms) <= n:
           try: any(t.append(A383185.terms.index(k))for k in range(len(t), n+1))
           except: A.N = A.N*5//4+99; A383185(A.N)
        return A.terms[n]