login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257570 Rectangular array, read by antidiagonals: d(h,k) = distance between h and k in the tree at A232558, for h >=0, k >= 0. 3
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, 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, 3, 3, 4, 4, 4, 4, 3, 3, 4, 6, 5, 5, 3, 4, 1, 5, 0, 5 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

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.

LINKS

Clark Kimberling, Antidiagonals n = 1..60, flattened

EXAMPLE

Northwest corner:

0  1  2  3  3  4  4  5  4  5  5

1  0  1  2  2  3  3  4  3  4  4

2  1  0  1  1  2  2  3  2  3  3

3  2  1  0  2  3  1  2  3  4  4

3  2  1  2  0  1  3  4  1  2  2

4  3  2  3  1  0  4  5  2  3  1

d(4,6) = d(6,4) = 3 counts the edges in the path 6,3,2,4;

d(46,21) = 6 counts the edges in the path 46,23,22,11,10,20,21.

MATHEMATICA

f[{x_, y_}] := If[EvenQ[x], {y, x/2}, {x - 1, y}];

g[{x_, y_}] := Drop[FixedPointList[f, {x, y}], -1];

s[n_] := Reverse[Select[Sort[Flatten[Select[g[{n, 0}], #[[2]] == 0 &]]], # > 0 &]];

m[h_, k_] := Max[Intersection[s[h], s[k]]];

j[h_, k_] := Join[Select[s[h], # >= m[h, k] &], Reverse[Select[s[k], # > m[h, k] &]]];

d[h_, k_] := If[k*h == 0, Length[j[h, k]], -1 + Length[j[h, k]]];

TableForm[Table[d[h, k], {h, 0, 16}, {k, 0, 16}]]  (* A257570 array *)

Flatten[Table[d[h - k, k], {h, 0, 20}, {k, 0, h}]  (* A257570 sequence *)]

CROSSREFS

Cf. A257571, A232558.

Sequence in context: A319876 A105805 A194547 * A220417 A049581 A114327

Adjacent sequences:  A257567 A257568 A257569 * A257571 A257572 A257573

KEYWORD

nonn,tabl,easy

AUTHOR

Clark Kimberling, May 01 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 12:21 EDT 2019. Contains 322429 sequences. (Running on oeis4.)