A054770 (Conway's version of the Kimberling-table)
Wouter Meeussen
w.meeussen.vdmcc at vandemoortele.be
Fri Jun 9 17:36:16 CEST 2000
decompose an integer into non-adjacent fibs, use fib-indices
fibodec[50]
{9, 7, 4}
fib(9)+fib(7)+fib(4) = 34+13+3 = 50
fibodec[10^64]
{307, 305, 303, 299, 291, 289, 285, 283, 279, 277, 275, 270, 264, 262, 257,
253, 250, 248, 246, 242, 240, 238, 235, 233, 228, 224, 221, 218, 216, 212,
208, 201, 197, 185, 183, 181, 179, 177, 175, 171, 164, 159, 157, 155, 152,
146, 140, 137, 133, 125, 118, 114, 110, 108, 102, 98, 95, 84, 80, 78, 76,
72, 69, 67, 65, 63, 60, 58, 53, 51, 43, 41, 38, 34, 32, 30, 27, 25, 22, 11,
9, 7}
Plus @@ Fibonacci /@ %
10000000000000000000000000000000000000000000000000000000000000000
(checks out ok)
Now, subtract 1 from all fib-indices and you get the left neighbour in
Conway's version of the Kimberling-table.
The leading column (JHC's "-1"-th column) is obtained by subtracting the
last fib-index, resulting in a trailing zero.
The "para-fib" is just to its right, so you subtract the (last fibindex-1).
Put Humpty-Dumpty together again by Fibonacci( fib-index) and summing.
Last[fibodec[50]] - 1
((Plus @@ Fibonacci /@ #1 & ) /@ {#1 - Last[#1], #1 - Last[#1] + 1, #1} &
)[fibodec[50]]
3 (* (last element -1) of fibodec[50]= {9, 7, 4}
*)
{7, 12, 50} (* 7-th row, para-fib[7]=12, so it's column 3
*)
Let's go a bit bigger :
Last[fibodec[10^64]] - 1
((Plus @@ Fibonacci /@ #1 & ) /@ {#1 - Last[#1], #1 - Last[#1] + 1, #1} &
)[fibodec[10^64]]
6
{344418537486330266596288467532955303640193374749172077608320951,
557280900008412143633053250748950582375265615538971029164110184,
10000000000000000000000000000000000000000000000000000000000000000}
so it's row 344418...0951 , and that one's par-fib is 55728...0184, and
10^64 is found in column 6.
not so hard, and beats doing it by hand.
Wouter.
------------------------------------------------------------------------
---------------------------------------------------
fibodec[n_Integer] := Module[{it},
it = FixedPointList[#1 - (Function[z, First[Select[Fibonacci[{1, 0, -1}
+ Floor[2 + Log[GoldenRatio, z]]], #1 <= z & , 1]]])[
#1] & , n, SameTest -> (#2 <= 0 & )]; (Floor[2 + Log[GoldenRatio,
#1]] & ) /@ (Drop[it, -1] - Rest[it])]
Wouter Meeussen
tel +32 (0)51 33 21 24
fax +32 (0)51 33 21 75
w.meeussen at vandemoortele.be
More information about the SeqFan
mailing list