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.

A099890 XOR BINOMIAL transform of the odd numbers; also the main diagonal of the XOR difference triangle A099889.

Original entry on oeis.org

1, 2, 4, 0, 8, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
Offset: 0

Views

Author

Paul D. Hanna, Oct 29 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1},Table[If[IntegerQ[Log2[n]],2n,0],{n,512}]] (* or *) Join[{1},With[{kk=10},Flatten[ Riffle[ 2^Range[kk],Table[PadRight[{},2^k-1,0],{k,0,kk}]]]]] (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    a(n)=local(B);B=0;for(i=0,n,B=bitxor(B,binomial(n,i)%2*(2*(n-i)+1)));B

Formula

a(0) = 1; a(2^n) = 2^(n+1); a(n) = 0 otherwise.