OFFSET
1,3
COMMENTS
Zeckendorf distance is defined at A226207.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
EXAMPLE
6 = 5 + 1 -> 3, and 2^6 = 55 + 8 + 1 -> 34 + 5 -> 21 + 3 -> 13 + 2 -> 8 + 1 -> 5 -> 3. The total number of Zeckendorf downshifts (i.e., arrows) is 7, so that a(6) = D(6,64) = 7.
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)]; lst = Map[d[#, 2^#]] &, Range[100]] (* Peter J. C. Moses, May 30 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 31 2013
STATUS
approved