The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271472 Binary representation of n in base i-1. 3


%S 0,1,1100,1101,111010000,111010001,111011100,111011101,111000000,

%T 111000001,111001100,111001101,100010000,100010001,100011100,

%U 100011101,100000000,100000001,100001100,100001101,110011010000,110011010001,110011011100,110011011101,110011000000,110011000001

%N Binary representation of n in base i-1.

%C This is A066321(n) converted from base 10 to base 2.

%C Every Gaussian integer r+s*i (r, s ordinary integers) has a unique representation as a sum of powers of t = i-1. For example 3 = 1+b^2+b^3, that is, "1101" in binary, which explains a(3) = 1101. See A066321 for further information.

%D D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1969, Vol. 2, p. 172. (See also exercise 16, p. 177; answer, p. 494.)

%D W. J. Penney, A "binary" system for complex numbers, JACM 12 (1965), 247-248.

%H Chai Wah Wu, <a href="/A271472/b271472.txt">Table of n, a(n) for n = 0..10000</a>

%H N. J. A. Sloane, <a href="/A066321/a066321.txt">Table of n, (I-1)^n for n=0..100</a>

%o (Python)

%o from gmpy2 import c_divmod

%o u = ('0000','1000','0011','1011')

%o def A271472(n):

%o if n == 0:

%o return 0

%o else:

%o s, q = '', n

%o while q:

%o q, r = c_divmod(q, -4)

%o s += u[r]

%o return int(s[::-1]) # _Chai Wah Wu_, Apr 09 2016

%Y Cf. A066321.

%K nonn,base

%O 0,3

%A _N. J. A. Sloane_, Apr 08 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 17 21:46 EST 2020. Contains 332006 sequences. (Running on oeis4.)