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.
%I A267181 #20 Feb 08 2019 12:44:02 %S A267181 0,1,0,1,0,0,1,2,1,0,1,3,0,2,0,1,4,4,3,3,0,1,5,2,0,1,4,0,1,6,5,5,4,4, %T A267181 5,0,1,7,3,6,0,5,2,6,0,1,8,6,2,6,5,1,5,7,0,1,9,4,6,4,0,3,5,3,8,0,1,10, %U A267181 7,7,7,7,6,6,6,6,9,0,1,11,5,3,2,7,0,6,1,2,4,10,0 %N A267181 Array read by antidiagonals: T(i,j) (i>=0, j>=0) = number of steps to reach either top row or main diagonal using the steps (i,j)->(j,i) or (i,j)->(i,j-i). %C A267181 We start at (i,j) and apply either (i,j) -> (j,i) if i>j or (i,j) -> (i,j-i) if j>i. T(i,j) is the minimal number of steps to reach either (0,k) or (k,k) for some k. %C A267181 Somewhat analogous to the array in A072030 except that here the offset is different and we pay for transposition steps as well as subtraction steps. %F A267181 Recurrence: T(0,k)=TR(k,k)=0; if i>j then T(i,j)=T(j,i)+1; if j>i then T(i,j)=T(i,j-i)+1. %F A267181 For a > 1 and b,k > 0, T(ak,k) = a, T(ak+b,k) = T(b,k) + a + 2, T(k,ak) = a - 1, T(k,ak+b) = T(k,b) + a. - _Charlie Neder_, Feb 08 2019 %e A267181 Array begins: %e A267181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... %e A267181 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... %e A267181 1, 2, 0, 3, 1, 4, 2, 5, 3, 6, 4, 7, 5, ... %e A267181 1, 3, 4, 0, 4, 5, 1, 5, 6, 2, 6, 7, 3, ... %e A267181 1, 4, 2, 5, 0, 5, 3, 6, 1, 6, 4, 7, 2, ... %e A267181 1, 5, 5, 6, 6, 0, 6, 6, 7, 7, 1, 7, 7, ... %e A267181 1, 6, 3, 2, 4, 7, 0, 7, 4, 3, 5, 8, 1, ... %e A267181 1, 7, 6, 6, 7, 7, 8, 0, 8, 7, 7, 8, 8, ... %e A267181 1, 8, 4, 7, 2, 8, 5, 9, 0, 9, 5, 8, 3, ... %e A267181 1, 9, 7, 3, 7, 8, 4, 8, 10, 0, 10, 8, 4, ... %e A267181 1, 10, 5, 7, 5, 2, 6, 8, 6, 11, 0, 11, 6, ... %e A267181 1, 11, 8, 8, 8, 8, 9, 9, 9, 9, 12, 0, 12, ... %e A267181 1, 12, 6, 4, 3, 8, 2, 9, 4, 5, 7, 13, 0, ... %e A267181 ... %e A267181 The first few antidiagonals are: %e A267181 0, %e A267181 1, 0, %e A267181 1, 0, 0, %e A267181 1, 2, 1, 0, %e A267181 1, 3, 0, 2, 0, %e A267181 1, 4, 4, 3, 3, 0, %e A267181 1, 5, 2, 0, 1, 4, 0, %e A267181 1, 6, 5, 5, 4, 4, 5, 0, %e A267181 1, 7, 3, 6, 0, 5, 2, 6, 0, %e A267181 1, 8, 6, 2, 6, 5, 1, 5, 7, 0, %e A267181 1, 9, 4, 6, 4, 0, 3, 5, 3, 8, 0, %e A267181 ... %p A267181 M:=12; %p A267181 A:=Array(0..M, 0..M, 0); %p A267181 for k from 0 to M do A[0,k]:=0; A[k,k]:=0; od: %p A267181 # border number k %p A267181 # col k, row n %p A267181 for k from 1 to M do %p A267181 for n from 1 to k-1 do A[n,k]:=A[n,k-n]+1; od: %p A267181 # row k, col i %p A267181 for i from k-1 by -1 to 0 do A[k,i]:=A[i,k]+1; od: %p A267181 od: %p A267181 for n from 0 to M do lprint([seq(A[n,k],k=0..M)]); od: # square array %p A267181 for n from 0 to M do lprint([seq(A[n-j,j],j=0..n)]); od: # antidiagonals %Y A267181 Cf. A072030. %Y A267181 For initial rows and columns see A267182-A267187. %Y A267181 For the array read mod 2, see A267188. %K A267181 nonn,tabl %O A267181 0,8 %A A267181 _N. J. A. Sloane_, Jan 16 2016