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.

A131851 Real part of the function z(n)=Sum(d(k)*i^k: d as in n=Sum(d(k)*2^k), i=sqrt(-1)).

Original entry on oeis.org

0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, -1, 0, -1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, -1, 0, -1, 0, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, -1, 0, -1, 0, -2, -1, -2, -1, -1, 0, -1, 0, -2, -1, -2, -1, 0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, -1, 0, -1, 0, -1, 0, -1, 0, -2, -1, -2, -1, -1, 0, -1, 0, -2, -1, -2
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 22 2007

Keywords

Comments

A131852(n) = Im(z(n));
z(A000079(n))=(A056594(n),A056594(n+3)); a(A000079(n))=A056594(n);
a(A131854(n))=0; a(A131861(n))>0; a(A131859(n))=1; a(A131863(n))<0;
z(A131853(n))=(0,0); z(A131856(n))=(0,1); z(A131858(n))=(1,0); z(A131860(n))=(1,1);
for n>0: a(A131865(n))=n and ABS(a(m))A131865(n).

Crossrefs

Cf. A007088.

Programs

  • Mathematica
    z[0] = 0; z[n_] := z[n] = z[Floor[n/2]]*I + Mod[n, 2]; Table[z[n] // Re, {n, 0, 110}] (* Jean-François Alcover, Jul 03 2013 *)

Formula

z(n) = if n=0 then (0, 0) else z(floor(n/2))*(0, 1) + (n mod 2, 0), complex multiplication.