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.

A318702 For any n >= 0 with binary expansion Sum_{k=0..w} b_k * 2^k, let f(n) = Sum_{k=0..w} b_k * i^k * 2^floor(k/2) (where i denotes the imaginary unit); a(n) is the real part of f(n).

This page as a plain text file.
%I A318702 #15 Sep 02 2018 13:37:04
%S A318702 0,1,0,1,-2,-1,-2,-1,0,1,0,1,-2,-1,-2,-1,4,5,4,5,2,3,2,3,4,5,4,5,2,3,
%T A318702 2,3,0,1,0,1,-2,-1,-2,-1,0,1,0,1,-2,-1,-2,-1,4,5,4,5,2,3,2,3,4,5,4,5,
%U A318702 2,3,2,3,-8,-7,-8,-7,-10,-9,-10,-9,-8,-7,-8,-7
%N A318702 For any n >= 0 with binary expansion Sum_{k=0..w} b_k * 2^k, let f(n) = Sum_{k=0..w} b_k * i^k * 2^floor(k/2) (where i denotes the imaginary unit); a(n) is the real part of f(n).
%C A318702 See A318703 for the imaginary part of f.
%C A318702 See A318704 for the square of the modulus of f.
%C A318702 The function f defines a bijection from the nonnegative integers to the Gaussian integers.
%C A318702 This sequence has similarities with A316657.
%H A318702 Rémy Sigrist, <a href="/A318702/b318702.txt">Table of n, a(n) for n = 0..16383</a>
%H A318702 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A318702 Rémy Sigrist, <a href="/A318702/a318702.png">Colored scatterplot of (a(n), A318703(n)) for n = 0..2^19-1</a> (where the hue is function of n)
%F A318702 a(n) = A053985(A059905(n)).
%F A318702 a(4 * k) = -2 * a(k) for any k >= 0.
%t A318702 Array[Re[Total@ MapIndexed[#1*I^(First@ #2 - 1)*2^Floor[(First@ #2 - 1)/2] &, Reverse@ IntegerDigits[#, 2]]] &, 76, 0] (* _Michael De Vlieger_, Sep 02 2018 *)
%o A318702 (PARI) a(n) = my (b=Vecrev(binary(n))); real(sum(k=1, #b, b[k] * I^(k-1) * 2^floor((k-1)/2)))
%Y A318702 Cf. A053985, A059905, A316657, A318703, A318704.
%K A318702 sign,base
%O A318702 0,5
%A A318702 _Rémy Sigrist_, Sep 01 2018