login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226207 Table by antidiagonals: D(m,n) = Zeckendorf distance between m and n. 11
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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The Zeckendorf distance between positive integers m and n is defined as follows. Suppose that n = F(i1) + F(i2) + ... F(ij) is the Zeckendorf representation of n, where 1 is represented as F(1), not F(2). Let d(n) = F(i1 - 1) + F(i2 - 1) + ... + F(ij - 1); i.e., the indexes for n are downshifted to form d(n). Starting with any n, the number of arrows in the graph n -> d(n) -> d(d(n)) -> ... -> 1 is the "generation number" of n; write the k-th node as s(k,n). If m and n are positive integers, let K(m) and K(n) be the numbers for which s(K(m),m) = s(K(n),n). This first common ancestor, or root, of m and n is denoted r(m,n). The distance between m and n is D(m,n) = K(m) + K(n).
It is helpful to regard m and n as nodes in a "Zeckendorf tree" rooted a 1 with edges given by successive upshifting of indexes of Zeckendorf representations; then D(m,n) is the number of edges from m to n. Equivalently, one can start with the Fibonacci (or rabbit) tree of the positive rational numbers (A226080). Replacing each fraction in the tree by its position when the elements are arranged in the order in which generated gives the Zeckendorf array. Thus, D is not only the Zeckendorf graph metric for positive integers, but is also, isomorphically speaking, a graph metric for the positive rational numbers.
Suppose that b(n) and c(n) are sequences of positive integers. Sequences D(b(n),c(n)), with exceptions for first terms in some cases, are indicated here:
....
D(b(n),c(n)) ... b(n) ........ c(n)
A000012 ........ F(n) ........ F(n+1), consecutive Fibonacci numbers
A005408 ........ F(n) ........ L(n), Fibonacci(n) and Lucas(n)
A095791 ........ 1 ........... n
A000012 ........ A000201(n) .. A001950(n), the Wythoff sequences
A226208 ........ n ........... n+1
A226209 ........ n ........... n+2
A226210 ........ n............ F(n)
A226211 ........ n............ 2n
A226212 ........ n............ floor(n/2)
A226213 ........ n............ 2^n
A226214 ........ n............ n^2
A226215 ........ n! .......... (n+1)!
LINKS
EXAMPLE
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.
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 *)
CROSSREFS
Sequence in context: A129678 A261773 A339733 * A226324 A339697 A023604
KEYWORD
nonn,tabl,easy
AUTHOR
Clark Kimberling, May 31 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 11:31 EDT 2024. Contains 371792 sequences. (Running on oeis4.)