login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177505 Base 2i representation of n reinterpreted in base 4. 2
0, 1, 2, 3, 304, 305, 306, 307, 288, 289, 290, 291, 272, 273, 274, 275, 256, 257, 258, 259, 560, 561, 562, 563, 544, 545, 546, 547, 528, 529, 530, 531, 512, 513, 514, 515, 816, 817, 818, 819, 800, 801, 802, 803, 784, 785 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

The use of negabinary dispenses with the need for sign bits and for keeping track of signed and unsigned data types. Similarly, the use of base 2i, or quater-imaginary, dispenses with the need to represent the real and imaginary parts of a complex number separately. (The term "quater-imaginary" appears in Knuth's landmark book on computer programming).

Quater-imaginary, based on the powers of 2i (twice the imaginary unit), uses the digits 0, 1, 2, 3. For purely real positive integers, the quater-imaginary representation is the same as negaquartal (base -4) except that 0s are "riffled" in, corresponding to the odd-indexed powers of 2i which are purely imaginary numbers. Therefore, to obtain the base 2i representations of positive real numbers, the algorithm for base -4 representations can be employed with only a small adjustment.

To obtain the base 2i representation of a complex number a+bi, do as above for the real part, then again for the real part of 2i*(a+bi) = -2b+2ai, giving the digits corresponding to the odd-indexed powers of 2i. - Daniel Forgues, May 18 2012

REFERENCES

Donald Knuth, The Art of Computer Programming. Volume 2, 2nd Edition. Reading, Massachussetts: Addison-Wesley (1981): 189

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

Donald Knuth, An imaginary number system, Communications of the ACM 3 (4), April 1960, pp. 245-247.

OEIS Wiki, Quater-imaginary base

Wikipedia, Quater-imaginary base

EXAMPLE

a(5) = 305 because 5 in base 2i is 10301 ( = (2i)^4 + 3 * (2i)^2 + (2i)^0), and (-4)^4 + 3 * (-4)^2 + (-4)^0 = 256 + 3 * 16 + 1 = 305.

MATHEMATICA

(* First run the program from A039724 to define ToNegaBases *) Table[FromDigits[Riffle[IntegerDigits[ToNegaBases[n, 4]], 0], 4], {n, 0, 63}]

CROSSREFS

Cf. A005351 (base -2 representation of n reinterpreted as binary).

Cf. A212494 (base 2i representation of n).

Sequence in context: A037059 A087313 A004876 * A068104 A065586 A110931

Adjacent sequences:  A177502 A177503 A177504 * A177506 A177507 A177508

KEYWORD

nonn,easy,base

AUTHOR

Alonso del Arte, Feb 03 2012

EXTENSIONS

Corrected "quarter-imaginary" to "quater-imaginary" - Daniel Forgues, May 18 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 23 19:00 EST 2017. Contains 295128 sequences.