Today I re-discovered an interesting property.
"If n is a fibbinary number, then n ^ 2n ^ 3n = 0".
Reinhard Zumkeller had already invented this property in 2005. I came to know this only after 20 days after publishing this post.
Background:
Fibbinary numbers are integers whose binary representation contains no consecutive ones.
First few fibbinary numbers are as follows: 0, 1, 2, 4, 5, 8, 9, 10, 16, 17, 18..
3, 6, 7, 10, 11... are not fibbinary numbers because they have two adjacent 1s in it's binary representation.
Proof:
Fibbinary numbers have a property n & (n >> 1) = 0 (Because 0's and 1's cancel out each other when we do AND operation)
We have n & (n >> 1) = 0
this can also be rewritten as
n & (n << 1) = 0
n & 2n = 0
We also know if a & b == 0 then a^b = a+b
Now assume a is n and b is 2n. We get
. n ^ 2n = 3n
Therefore n ^ 2n ^ 3n = 0 for all fibbinary numbers.
Math is fun!
"If n is a fibbinary number, then n ^ 2n ^ 3n = 0".
Reinhard Zumkeller had already invented this property in 2005. I came to know this only after 20 days after publishing this post.
Background:
Fibbinary numbers are integers whose binary representation contains no consecutive ones.
First few fibbinary numbers are as follows: 0, 1, 2, 4, 5, 8, 9, 10, 16, 17, 18..
3, 6, 7, 10, 11... are not fibbinary numbers because they have two adjacent 1s in it's binary representation.
Proof:
Fibbinary numbers have a property n & (n >> 1) = 0 (Because 0's and 1's cancel out each other when we do AND operation)
We have n & (n >> 1) = 0
this can also be rewritten as
n & (n << 1) = 0
n & 2n = 0
We also know if a & b == 0 then a^b = a+b
Now assume a is n and b is 2n. We get
. n ^ 2n = 3n
Therefore n ^ 2n ^ 3n = 0 for all fibbinary numbers.
Math is fun!