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.

A143432 Ultimately period 4 sequence [ 2, 2, 0, 0, ...] with a(0) = a(1) = 1.

Original entry on oeis.org

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

Views

Author

Michael Somos, Aug 14 2008, Sep 18 2008

Keywords

Crossrefs

Convolution inverse of A143431.

Programs

  • Mathematica
    PadRight[{1,1},120,{2,2,0,0}] (* Harvey P. Dale, Feb 13 2016 *)
  • PARI
    {a(n) = if(n<0, 0, n = n\2; if( n%2, 0, (n>1)+1 ))}

Formula

Euler transform of length 8 sequence [ 1, -1, 0, 2, 0, 0, 0, -1].
a(4*n + 2) = a(4*n + 3) = 0. a(4*n) = a(4*n + 1) = 2 unless n < 1.
G.f.: (1 + x^4) / ((1 - x) * (1 + x^2)).
a(n) = ((n+2) mod 4) - (n mod 2) - floor(3/(n+2)). - Wesley Ivan Hurt, Jun 30 2013