Negabinary Numbers

2010=101002=101002\Large 20_{10} = 10100_2 = 10100_{-2}

Today, modern mathematics uses what is known as the decimal number system to write out large numbers. This means that when we write our numbers, we do so by thinking in powers of 1010. For example, the number 234234 is really 2×102+3×101+4×1002\times10^2+3\times10^1+4\times10^0.

While the number 1010 is the norm used around the world, numbers can really be written in any base. Take our example of 234234 from above. It can be written as4×72+5×71+3×704\times7^2+5\times7^1+3\times7^0, meaning that it's base 77 representation is 4537453_7. The subscript 77 denotes that the number is not in base 10, as to avoid confusion.

Not only can numbers be written in positive bases, but in negative bases as well! The example that can be seen at the top of the problem shows the conversion of the number 2020 to Base 22, known as binary, and Base 2-2, known as negabinary. As you can see, its representation is the same in both bases, but this is not the case with all numbers. For example, 7=1112=1101127=111_2=11011_{-2}. How many positive integers n<1000n<1000 have the same representation in both binary and negabinary?

×

Problem Loading...

Note Loading...

Set Loading...