login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318438 For any n >= 0 with binary expansion Sum_{k=0..w} b_k * 2^k, let h(n) = Sum_{k=0..w} b_k * (i-1)^k (where i denotes the imaginary unit); a(n) is the real part of h(n). 7
0, 1, -1, 0, 0, 1, -1, 0, 2, 3, 1, 2, 2, 3, 1, 2, -4, -3, -5, -4, -4, -3, -5, -4, -2, -1, -3, -2, -2, -1, -3, -2, 4, 5, 3, 4, 4, 5, 3, 4, 6, 7, 5, 6, 6, 7, 5, 6, 0, 1, -1, 0, 0, 1, -1, 0, 2, 3, 1, 2, 2, 3, 1, 2, 0, 1, -1, 0, 0, 1, -1, 0, 2, 3, 1, 2, 2, 3, 1, 2 (list; graph; refs; listen; history; text; internal format)
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, 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
Cf. A009116, A318439 (imaginary part), A318479 (norm), A340669 (negation).
Cf. A316657 (base 2+i).
Sequence in context: A194306 A283325 A353707 * A294233 A121884 A079087
KEYWORD
sign,look,base
AUTHOR
Rémy Sigrist, Aug 26 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 23 05:14 EDT 2024. Contains 373629 sequences. (Running on oeis4.)