Wow, yesterday's post featured Gray Code Niven Numbers and in today's post we're featuring Negabinary Niven Numbers. Here's what Gemini had to say about negabinary:
Negabinary is a base-negative-2 number system that uses the digits 0 and 1 to represent numbers. It's similar to the binary system, but without the need for a negative sign.
How to convert to negabinary
- To convert a decimal number to negabinary, divide the number by -2 repeatedly.
- Record the non-negative remainder of 0 or 1 each time you divide.
- Take the remainders in reverse order to get the negabinary expansion.
Why use negabinary?
- Negabinary doesn't require a negative sign, or two's complement.
- All integers, negative or positive, can be written as an unsigned stream of 1s and 0s.
- This representation is "more unique" than with a positive base because, without signs, there is not the problem of +0 being equal to -0.
Related negative-base numeral systems: negadecimal (base −10) and negaternary (base −3).
There is a great site that converts decimal to negabinary and binary to negabinary and vice versa. See Figure 1. We'll be using it shortly.
![]() |
Figure 1: link |
So what led me to negabinary numbers? Well, the number associated with my diurnal age today (27728) has a property that allows it membership of OEIS A331824.
We use the site above to convert the decimal numbers 22728, 22729, 22730 and 22731 to negabinary and then test to see that the total number of 1's for each number divides the number. This is indeed the case. See Table 1.
![]() |
Table 1: permalink |
The initial members of the sequence are 1, 1264, 2104, 2944, 4624, 11888, 23768, 27312, 27728, 31688, 35648.
Table 2 shows the negabinary representations of the numbers from 0 to 16:
![]() |
Table 2 |
No comments:
Post a Comment