OFFSET
0,9
COMMENTS
See A318439 for the imaginary part of h.
See A318479 for the square of the modulus of h.
The function h corresponds to the interpretation of the binary representation of a number in base -1+i and defines a bijection from the nonnegative integers to the Gaussian integers.
The function h has nice fractal features (see scatterplot in Links section).
This sequence has similarities with A316657.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Colored scatterplot of (a(n), A318439(n)) for n = 0..2^20-1 (where the hue is function of n)
Wikipedia, Base -1+/-i
FORMULA
a(2^k) = A009116(k) for any k >= 0.
PROG
(PARI) a(n) = my (d=Vecrev(digits(n, 2))); real(sum(i=1, #d, d[i]*(I-1)^(i-1)))
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Aug 26 2018
STATUS
approved