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).

This page as a plain text file.
%I A383189 #13 May 23 2025 01:08:04
%S A383189 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,
%T A383189 34,32,57,30,11,26,49,24,22,43,72,41,18,37,64,99,62,33,58,91,56,29,27,
%U A383189 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
%N 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).
%H A383189 <a href="/index/Per#IntegerPermutation">OEIS index to sequences related to permutations of the integers</a>.
%o A383189 (Python)
%o A383189 def A383189(n):
%o A383189     if not hasattr(A:=A383189, 'terms'): A.terms=[0]
%o A383189     while len(t := A.terms) <= n:
%o A383189        try: any(t.append(A383187.terms.index(k))for k in range(len(t), n+1))
%o A383189        except: A383187(len(getattr(A383187,'terms',0)+100))
%o A383189     return A.terms[n]
%Y A383189 Cf. A383187 (inverse permutation).
%K A383189 nonn
%O A383189 0,2
%A A383189 _M. F. Hasler_, May 12 2025