The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A348690 For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the real part of f(n) = Sum_{k >= 0} b_k * (i^Sum_{j = 0..k-1} b_j) * (1+i)^k (where i denotes the imaginary unit); sequence A348691 gives the imaginary part. 3

%I #17 Nov 01 2021 00:36:10

%S 0,1,1,0,0,-1,-1,0,-2,-1,-1,2,-2,1,1,2,-4,1,1,4,0,3,3,0,-2,3,3,2,2,1,

%T 1,-2,-4,5,5,4,4,3,3,-4,2,3,3,-2,2,-3,-3,-2,0,5,5,0,4,-1,-1,-4,2,-1,

%U -1,-2,-2,-3,-3,2,0,9,9,0,8,-1,-1,-8,6,-1,-1,-6,-2

%N For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the real part of f(n) = Sum_{k >= 0} b_k * (i^Sum_{j = 0..k-1} b_j) * (1+i)^k (where i denotes the imaginary unit); sequence A348691 gives the imaginary part.

%C The function f defines a bijection from the nonnegative integers to the Gaussian integers.

%C The function f has similarities with A065620; here the nonzero digits in base 1+i cycle through powers of i, there nonzero digits in base 2 cycle through powers of -1.

%C If we replace 1's in binary expansions by powers of i from left to right (rather than right to left as here), then we obtain the Lévy C curve (A332251, A332252).

%H Rémy Sigrist, <a href="/A348690/b348690.txt">Table of n, a(n) for n = 0..8191</a>

%H Chandler Davis and Donald Knuth, Number representations and Dragon Curves I, Journal of Recreational Mathematics, volume 3, number 2 (April 1970), pages 66-81. Reprinted in Donald E. Knuth, <a href="http://www-cs-faculty.stanford.edu/~uno/fg.html">Selected Papers on Fun and Games</a>, CSLI Publications, 2011, pages 571-614.

%H Rémy Sigrist, <a href="/A348690/a348690.png">Colored representation of f(n) for n < 2^18 in the complex plane</a> (the hue is function of n)

%H Rémy Sigrist, <a href="/A348690/a348690_1.png">Colored representation of f(n) for n < 2^18 in the complex plane</a> (the color is function of A000120(n) mod 4)

%H Rémy Sigrist, <a href="/A348691/a348691.png">Colored representation of f(n) for n < 2^18 in the complex plane</a> (the color is function of the binary length of n, A070939(n))

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

%o (PARI) a(n) = { my (v=0, o=0, x); while (n, n-=2^x=valuation(n, 2); v+=I^o * (1+I)^x; o++); real(v) }

%Y See A332251 for a similar sequence.

%Y Cf. A000120, A065620, A146559, A348691, A332251, A332252.

%K sign,look,base

%O 0,9

%A _Rémy Sigrist_, Oct 29 2021

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 7 11:44 EDT 2024. Contains 373173 sequences. (Running on oeis4.)