Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Fibonacci base

created by Seqram

(idea) by Seqram (5.1 y) (print)   ?   (I like it!) 1 C! Wed Sep 13 2000 at 2:10:55

A number base using the Fibonacci numbers for its places. Since the first two Fibonacci numbers are both 1, in this base all integers end with a 0, or else you simply omit that place as being redundant. I'll take the second option in my examples.

So the number 42 is 10010000: 0*1 + 0*2 + 0*3 + 0*5 + 1*8 + 0*13 + 0*21 + 1*34. It turns out (not hard to prove this) that you only need the digits 0 and 1. Also, you have to adopt the convention that consecutive 1's are forbidden, since 11=100 (1+2=3, by the very definition of the Fibonacci series) and you'd wind up with multiple representations for the same number. Under that constraint, numbers have a unique representation.

It's a special kind of torture/pleasure to work with such numbers... I learned weird things about what happens when you work on simplifying the digits when you get one which is more than 1, to get it back into a well-formed digit string. And try coding your HP calculator to compute them. I did.


Added December 11, 2000:

apirkle is right, but that approach isn't always the easiest to use. It requires that you compute Fibonacci numbers, which isn't always convenient. What I did in programming my calculator was to notice that a "2" in the ith place was the same as a "1" in the i-2nd place and a "1" in the i+1st place (not hard to prove this). Generally, when a number was >1, add half to the place above it and half to the place two below it and set it to zero (or one if it was odd to start with). Then repeat that. Alternate with the identity of making consecutive 1's into 0's and replacing with a 1 in the next higher place (so whenever there are two >1 places in a row, add the smaller of them to the next higher place and subtract it from the two, leaving one zero). Keep working with those two, and eventually you get to all 1s and 0s.

ariels, I'm going to have to look at that! Ah, I see why it works. Cool.


(thing) by ariels (3.8 d) (print)   ?   (I like it!) 2 C!s Thu Oct 19 2000 at 7:33:04

Knuth points out a very useful property of the Fibonacci number base: conversions between kilometers and miles.

All you do is shift the digits!
For example, say I want to convert 65kmh to mph. Well, 6510 = 55 + 8 + 2 = 100010010fib, and shifting (right) we have 10001001fibmph = (34 + 5 + 1)mph = 4010mph (it's actually closer to 4110mph).

Details of why this works are left as an exercise to the interested reader.


printable version
chaos

Fibonacci like recurrence relations irrational-base number system Leave him in an empty room with a tape recorder Fibonacci number
interesting number bases exercise for the reader log2(x) = log10(x) + ln(x) Fibonacci numbers in nature
cp /dev/zero /dev/null Knuth exercise, left as an and then a miracle occurs
Golden ratio File permissions HP 48G Leonardo Pisano Fibonacci
Making an atomic bomb HP 49G God-Ween-Satan (The Oneness) Mean Streets
XOR swap An apple a day General Relativity Fibonacci
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help


cooled by sensei

Cool Staff Picks
Things you could have written:
Grethesis
Dead Can Dance
Hit by the realization that they are all getting to know you nodes
Cathy Martin and the tunnel of fire
Pascal's wager
Sometimes
The Joker
Our sensei
Baking bread
O Fortuna
The good drug guide
Male lactation
We miss our friends: A dysfunctional noder family reunion
New Writeups
doctor wilson
Soup, of the green variety(recipe)
Ctrl Y
cognitive dissonance(fiction)
SharQ
Gone Baby Gone(review)
halfWit
If I could, I'd title this "Freedom"(thing)
Roninspoon
Airline Hero(thing)
Ktistec
Why Women Are Always Cold(person)
doctor wilson
Drug policy reform(thing)
tejasa
Easy Raspberry Cheesecake(recipe)
Joysim
Drug policy reform(idea)
aneurin
Tyburn(place)
niruena
Boiling to death(idea)
artman2003
summer(thing)
doctor wilson
The Silver City and the Silent Sea(log)
Dreamvirus
The Silver City and the Silent Sea(poetry)
Aerobe
A nihilist's soulmate(poetry)
This affordable entertainment brought to you by The Everything Development Company