This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A226214 Zeckendorf distance between n and n^2. 2

%I

%S 0,1,2,5,3,6,4,6,10,9,11,12,9,11,13,12,8,6,10,15,12,14,16,16,13,15,15,

%T 11,17,11,13,18,18,15,17,17,19,19,19,16,16,18,18,18,14,14,8,12,14,16,

%U 21,21,21,21,18,18,20,20,20,22,22,22,22,22,19,19,19,21

%N Zeckendorf distance between n and n^2.

%C Zeckendorf distance is defined at A226207.

%H Clark Kimberling, <a href="/A226214/b226214.txt">Table of n, a(n) for n = 1..1000</a>

%e 7 = 5 + 2, and 7^2 = 34 + 13 + 2 -> 21 + 8 + 1 -> 13 + 5 -> 8 + 3 -> 5 + 2. The total number of Zeckendorf downshifts (i.e., arrows) is 4, so that a(7) = D(7,49) = 4.

%t 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]];

%t k--]; If[n > 0 && z[[1]] == 0, Rest[z], z]]; d[n1_, n2_] := Module[{z1 = zeck[n1], z2 =

%t zeck[n2]}, Length[z1] + Length[z2] - 2 (NestWhile[# + 1 &, 1, z1[[#]] == z2[[#]] &, 1,

%t Min[{Length[z1], Length[z2]}]] - 1)]; lst = Map[d[#, #^2]] &, Range[100]] (* _Peter J. C. Moses_, May 30 2013 *)

%Y Cf. A226080, A226207.

%K nonn,easy

%O 1,3

%A _Clark Kimberling_, May 31 2013

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.

Last modified December 8 02:30 EST 2019. Contains 329850 sequences. (Running on oeis4.)