A226207 Table by antidiagonals: D(m,n) = Zeckendorf distance between m and n.
0, 1, 1, 2, 0, 2, 2, 1, 1, 2, 3, 1, 0, 1, 3, 3, 2, 2, 2, 2, 3, 3, 2, 1, 0, 1, 2, 3, 4, 2, 1, 3, 3, 1, 2, 4, 4, 3, 3, 3, 0, 3, 3, 3, 4, 4, 3, 2, 1, 2, 2, 1, 2, 3, 4, 4, 3, 2, 4, 4, 0, 4, 4, 2, 3, 4, 4, 3, 2, 4, 1, 4, 4, 1, 4, 2, 3, 4, 5, 3, 4, 4, 1, 3, 0, 3
Offset: 1
Examples
Northwest corner of the distance table, D(m,n), m>=1, n>=1: 0 1 2 2 3 3 3 4 4 4 4 4 4 1 0 1 1 2 2 2 3 3 3 3 3 4 2 1 0 2 1 1 3 2 2 2 4 4 3 2 1 2 0 3 3 1 4 4 4 2 2 5 3 2 1 3 0 2 4 1 1 3 5 5 2 3 2 3 1 4 4 0 5 5 5 1 1 6 4 3 2 4 1 3 5 0 2 4 6 6 1 4 3 2 4 1 3 5 2 0 4 6 6 3 4 3 2 4 3 1 5 4 4 0 6 6 5 4 3 4 2 5 5 1 6 6 6 0 2 7 4 3 4 2 5 5 1 6 6 6 2 0 7 5 4 3 5 2 4 6 1 3 5 7 7 0 The distance from 36 to 26 is found here, showing successive downsteps: 36 = 34 + 8 + 3 + 1 -> 21 + 5 + 2 -> 13 + 3 + 1 -> 8 + 2 26 = 21 + 5 -> 13 + 3 -> 8 + 2 Thus, D(36,26) = 3 + 2 = 5; i.e. the root of 36 and 26, is 10; it takes 3 downshifts to get from 36 to 10 and 2 downshifts from 26 to 10, hence 5 edges in the Zeckendorf graph metric to get from 36 to 26.
Links
- Clark Kimberling, Antidiagonals n=1..60, flattened
Programs
-
Mathematica
zeck[n_Integer] := Block[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, z = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[z, 1]; t = t - Fibonacci[k], AppendTo[z, 0]]; k--]; If[n > 0 && z[[1]] == 0, Rest[z], z]]; d[n1_, n2_] := Module[{z1 = zeck[n1], z2 = zeck[n2]}, Length[z1] + Length[z2] - 2 (NestWhile[# + 1 &, 1, z1[[#]] == z2[[#]] &, 1, Min[{Length[z1], Length[z2]}]] - 1)]; Table[d[m, n], {m, 1, 20}, {n, 1, 20}] // TableForm (* A226207 array *) Flatten[Table[d[k, n + 1 - k], {n, 1, 12}, {k, 1, n}]] (* A226207 sequence *) (* Peter J. C. Moses, May 30 2013 *)
Comments