

A066321


Binary representation of base i1 expansion of n: replace i1 with 2 in base i1 expansion of n.


8



0, 1, 12, 13, 464, 465, 476, 477, 448, 449, 460, 461, 272, 273, 284, 285, 256, 257, 268, 269, 3280, 3281, 3292, 3293, 3264, 3265, 3276, 3277, 3088, 3089, 3100, 3101, 3072, 3073, 3084, 3085, 3536, 3537, 3548, 3549, 3520, 3521, 3532, 3533, 3344, 3345, 3356
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Here i = sqrt(1).
First differences follow a strange period16 pattern: 1 11 1 XXX 1 11 1 29 1 11 1 189 1 11 1 29 where XXX is given by A066322. Number of onebits is A066323.
From Andrey Zabolotskiy, Feb 06 2017: (Start)
(Observations.)
Actually, the sequence of the first differences can be split into blocks of size of any power of 2, and there will be only one position in the block that does not repeat. In this sense, one may say that the first differences follow (almost)period2^s pattern for any s>0.
Specifically, the first differences are given by the formula: a(n+1)a(n) = A282137(A007814((n xor ...110011001100) + 1)). Here binary representation of n is bitwisexored with the period4 bit sequence (A021913 written righttoleft) which is infinite or simply long enough; A007814(m) does not depend on the bits of m other than the least significant 1.
A282137 gives all first differences in the order of decreasing occurence frequency.
(End)


REFERENCES

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


LINKS

Paul Tek, Table of n, a(n) for n = 0..10000
Solomon I. Khmelnik, Specialized Digital Computer for Operations with Complex Numbers, Questions of Radio Electronics, 12 (1964), 6082 [in Russian].
W. J. Penney, A "binary" system for complex numbers, JACM 12 (1965), 247248.
N. J. A. Sloane, Table of n, (I1)^n for n=0..100
Paul Tek, Perl program for this sequence
Andrey Zabolotskiy, negation & addition of Gaussian integers written in base i1 [Python script].


FORMULA

In "rebase notation" a(n) = (i1)[n]2.
G.f. g(z) satisfies g(z) = z*(1+12*z+13*z^2)/(1z^4) + 16*z^4*(13+12*z^4+z^8)/((1z)*(1+z^4)*(1+z^8)) + 256*(1z^16)*g(z^16)/(z^12z^13).  Robert Israel, Oct 21 2016


EXAMPLE

a(4) = 464 = 2^8+2^7+2^6+2^4 since (i1)^8+(i1)^7+(i1)^6+(i1)^4 = 4.


MAPLE

f:= proc(n) option remember; local t, m;
t:= n mod 4;
procname(t) + 16*procname((tn)/4)
end proc:
f(0):= 0: f(1):= 1: f(2):= 12: f(3):= 13:
seq(f(i), i=0..100); # Robert Israel, Oct 21 2016


PROG

(Perl) See Links section.
(Python)
from gmpy2 import c_divmod
u = ('0000', '1000', '0011', '1011')
def A066321(n):
if n == 0:
return 0
else:
s, q = '', n
while q:
q, r = c_divmod(q, 4)
s += u[r]
return int(s[::1], 2) # Chai Wah Wu, Apr 09 2016


CROSSREFS

Cf. A066322, A066323, A282137.
See A271472 for the conversion of these decimal numbers to binary.
See A009116 and A009545 for real and imaginary parts of (i1)^n (except for signs).
See A256441 for expansions of n.
Sequence in context: A041309 A041310 A275959 * A099415 A042293 A061097
Adjacent sequences: A066318 A066319 A066320 * A066322 A066323 A066324


KEYWORD

base,easy,nonn


AUTHOR

Marc LeBrun, Dec 14 2001


STATUS

approved



