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

%I #21 Feb 03 2021 23:04:50

%S 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,

%T -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,

%U 1,2,2,3,1,2,0,1,-1,0,0,1,-1,0,2,3,1,2,2,3,1,2

%N 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).

%C See A318439 for the imaginary part of h.

%C See A318479 for the square of the modulus of h.

%C 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.

%C The function h has nice fractal features (see scatterplot in Links section).

%C This sequence has similarities with A316657.

%H Rémy Sigrist, <a href="/A318438/b318438.txt">Table of n, a(n) for n = 0..10000</a>

%H Rémy Sigrist, <a href="/A318438/a318438.png">Colored scatterplot of (a(n), A318439(n)) for n = 0..2^20-1</a> (where the hue is function of n)

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Complex-base_system#Base_%E2%88%921_%C2%B1_i">Base -1+/-i</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(2^k) = A009116(k) for any k >= 0.

%o (PARI) a(n) = my (d=Vecrev(digits(n,2))); real(sum(i=1, #d, d[i]*(I-1)^(i-1)))

%Y Cf. A009116, A318439 (imaginary part), A318479 (norm), A340669 (negation).

%Y Cf. A316657 (base 2+i).

%K sign,look,base

%O 0,9

%A _Rémy Sigrist_, Aug 26 2018

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 April 24 06:24 EDT 2024. Contains 371918 sequences. (Running on oeis4.)