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 A257570 #5 May 02 2015 10:15:55 %S A257570 0,1,1,2,0,2,3,1,1,3,3,2,0,2,3,4,2,1,1,2,4,4,3,1,0,1,3,4,5,3,2,2,2,2, %T A257570 3,5,4,4,2,3,0,3,2,4,4,5,3,3,1,1,1,1,3,3,5,5,4,2,2,3,0,3,2,2,4,5,6,4, %U A257570 3,3,4,4,4,4,3,3,4,6,5,5,3,4,1,5,0,5 %N A257570 Rectangular array, read by antidiagonals: d(h,k) = distance between h and k in the tree at A232558, for h >=0, k >= 0. %C A257570 The distance between h and k is the length of the path from h to k in the tree defined from the root 0 by edges from x to x+1 and x to 2x if x is even, and an edge from x to x+1 if x is odd. This is the tree defined at A232558; it is a subtree of the tree defined at A257569. %H A257570 Clark Kimberling, <a href="/A257570/b257570.txt">Antidiagonals n = 1..60, flattened</a> %e A257570 Northwest corner: %e A257570 0 1 2 3 3 4 4 5 4 5 5 %e A257570 1 0 1 2 2 3 3 4 3 4 4 %e A257570 2 1 0 1 1 2 2 3 2 3 3 %e A257570 3 2 1 0 2 3 1 2 3 4 4 %e A257570 3 2 1 2 0 1 3 4 1 2 2 %e A257570 4 3 2 3 1 0 4 5 2 3 1 %e A257570 d(4,6) = d(6,4) = 3 counts the edges in the path 6,3,2,4; %e A257570 d(46,21) = 6 counts the edges in the path 46,23,22,11,10,20,21. %t A257570 f[{x_, y_}] := If[EvenQ[x], {y, x/2}, {x - 1, y}]; %t A257570 g[{x_, y_}] := Drop[FixedPointList[f, {x, y}], -1]; %t A257570 s[n_] := Reverse[Select[Sort[Flatten[Select[g[{n, 0}], #[[2]] == 0 &]]], # > 0 &]]; %t A257570 m[h_, k_] := Max[Intersection[s[h], s[k]]]; %t A257570 j[h_, k_] := Join[Select[s[h], # >= m[h, k] &], Reverse[Select[s[k], # > m[h, k] &]]]; %t A257570 d[h_, k_] := If[k*h == 0, Length[j[h, k]], -1 + Length[j[h, k]]]; %t A257570 TableForm[Table[d[h, k], {h, 0, 16}, {k, 0, 16}]] (* A257570 array *) %t A257570 Flatten[Table[d[h - k, k], {h, 0, 20}, {k, 0, h}] (* A257570 sequence *)] %Y A257570 Cf. A257571, A232558. %K A257570 nonn,tabl,easy %O A257570 1,4 %A A257570 _Clark Kimberling_, May 01 2015