cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A318438 #21 Feb 03 2021 23:04:50
%S A318438 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 A318438 -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 A318438 1,2,2,3,1,2,0,1,-1,0,0,1,-1,0,2,3,1,2,2,3,1,2
%N 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).
%C A318438 See A318439 for the imaginary part of h.
%C A318438 See A318479 for the square of the modulus of h.
%C A318438 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 A318438 The function h has nice fractal features (see scatterplot in Links section).
%C A318438 This sequence has similarities with A316657.
%H A318438 Rémy Sigrist, <a href="/A318438/b318438.txt">Table of n, a(n) for n = 0..10000</a>
%H A318438 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 A318438 Wikipedia, <a href="https://en.wikipedia.org/wiki/Complex-base_system#Base_%E2%88%921_%C2%B1_i">Base -1+/-i</a>
%H A318438 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A318438 a(2^k) = A009116(k) for any k >= 0.
%o A318438 (PARI) a(n) = my (d=Vecrev(digits(n,2))); real(sum(i=1, #d, d[i]*(I-1)^(i-1)))
%Y A318438 Cf. A009116, A318439 (imaginary part), A318479 (norm), A340669 (negation).
%Y A318438 Cf. A316657 (base 2+i).
%K A318438 sign,look,base
%O A318438 0,9
%A A318438 _Rémy Sigrist_, Aug 26 2018