Ana Sayfa
Matematikçiler
Makaleler
Matematik Seçkileri
Fraktallar
Paradokslar
Sayılar Teorisi
=> Algebraic Curves-Mordell Curve
=> Algebraic Curves-Ochoa Curve
=> Algebraic Integer
=> Algebraic Number
=> Algebraic Number Theory
=> Chebotarev Density Theorem
=> Class Field
=> Cyclotomic Field
=> Dedekind Ring
=> Fractional Ideal
=> Global Field
=> Local Field
=> Number Field Signature
=> Picard Group
=> Pisot Number
=> Weyl Sum
=> Casting Out Nines
=> A-Sequence
=> Anomalous Cancellation
=> Archimedes' Axiom
=> B2-Sequence
=> Calcus
=> Calkin-Wilf Tree
=> Egyptian Fraction
=> Egyptian Number
=> Erdős-Straus Conjecture
=> Erdős-Turán Conjecture
=> Eye of Horus Fraction
=> Farey Sequence
=> Ford Circle
=> Irreducible Fraction
=> Mediant
=> Minkowski's Question Mark Function
=> Pandigital Fraction
=> Reverse Polish Notation
=> Division by Zero
=> Infinite Product
=> Karatsuba Multiplication
=> Lattice Method
=> Pippenger Product
=> Reciprocal
=> Russian Multiplication
=> Solidus
=> Steffi Problem
=> Synthetic Division
=> Binary
=> Euler's Totient Rule
=> Goodstein Sequence
=> Hereditary Representation
=> Least Significant Bit
=> Midy's Theorem
=> Moser-de Bruijn Sequence
=> Negabinary
=> Negadecimal
=> Nialpdrome
=> Nonregular Number
=> Normal Number
=> One-Seventh Ellipse
=> Quaternary
=> Radix
=> Regular Number
=> Repeating Decimal
=> Saunders Graphic
=> Ternary
=> Unique Prime
=> Vigesimal
Ziyaretçi defteri
 

Negabinary

The negabinary representation of a number n is its representation in base -2 (i.e., base negative 2). It is therefore given by the coefficients a_na_(n-1)...a_1a_0 in

n = sum_(i=0)a_i(-2)^i
(1)
= ...+a_2(-2)^2+a_1(-2)^1+a_0(-2)^0,
(2)

where a_i=0,1.

Conversion of n to negabinary can be done using the Mathematica code

Negabinary[n_Integer] := Module[
{t = (2/3)(4^Floor[Log[4, Abs[n] + 1] + 2] - 1)},
IntegerDigits[BitXor[n + t, t], 2]
]

due to D. Librik (Szudzik). The bitwise XOR portion is originally due to Schroeppel (1972), who noted that the sequence of bits in n is given by ...01010101.

The following table gives the negabinary representations for the first few integers (Sloane's A039724).

n negabinary n negabinary
1 1 11 11111
2 110 12 11100
3 111 13 11101
4 100 14 10010
5 101 15 10011
6 11010 16 10000
7 11011 17 10001
8 11000 18 10110
9 11001 19 10111
10 11110 20 10100

If these numbers are interpreted as binary numbers and converted to decimal, their values are 1, 6, 7, 4, 5, 26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, ... (Sloane's A005351). The numbers having the same representation in binary and negabinary are members of the Moser-de Bruijn sequence, 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, ... (Sloane's A000695).


Bugün 6 ziyaretçi (25 klik) kişi burdaydı!
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol