This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A348691 #24 Dec 30 2024 01:18:40 %S A348691 0,0,1,1,2,0,1,-1,2,-2,-1,-1,0,-2,-1,1,0,-4,-3,1,-2,0,1,3,-2,-2,-1,3, %T A348691 0,2,3,1,-4,-4,-3,5,-2,4,5,3,-2,2,3,3,4,2,3,-3,-4,0,1,5,2,4,5,-1,2,2, %U A348691 3,-1,4,-2,-1,-3,-8,0,1,9,2,8,9,-1,2,6,7,-1,8,-2 %N A348691 For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the imaginary 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 A348690 gives the real part. %C A348691 The function f defines a bijection from the nonnegative integers to the Gaussian integers. %C A348691 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 A348691 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 A348691 Rémy Sigrist, <a href="/A348691/b348691.txt">Table of n, a(n) for n = 0..8191</a> %H A348691 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 A348691 Chandler Davis and Donald E. Knuth, <a href="/A005811/a005811.pdf">Number Representations and Dragon Curves</a>, Journal of Recreational Mathematics, volume 3, number 2, April 1970, pages 66-81, and number 3, July 1970, pages 133-149. [Cached copy, with permission] %H A348691 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 A348691 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 A348691 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 A348691 a(2^k) = A009545(k) for any k >= 0. %o A348691 (PARI) a(n) = { my (v=0, o=0, x); while (n, n-=2^x=valuation(n, 2); v+=I^o * (1+I)^x; o++); imag(v) } %Y A348691 See A332251, A332252 for a similar sequence. %Y A348691 Cf. A000120, A009545, A065620, A070939, A348690. %K A348691 sign,look,base %O A348691 0,5 %A A348691 _Rémy Sigrist_, Oct 29 2021