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.

A102560 Expansion of (1-x^3)/(1-x^4).

Original entry on oeis.org

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

Views

Author

Paul Barry, Jan 14 2005

Keywords

Comments

Period 4: repeat [1, 0, 0, -1].

Programs

  • Magma
    &cat [[1, 0, 0, -1]^^30]; // Wesley Ivan Hurt, Jul 06 2016
    
  • Maple
    seq(op([1, 0, 0, -1]), n=0..50); # Wesley Ivan Hurt, Jul 06 2016
  • Mathematica
    CoefficientList[ Series[(1 - x^3)/(1 - x^4), {x, 0, 105}], x] (* Robert G. Wilson v, Jan 15 2005 *)
  • PARI
    x='x+O('x^50); Vec((1 - x^3)/(1 - x^4)) \\ G. C. Greubel, Jun 02 2017

Formula

G.f.: (1+x+x^2)/(1+x+x^2+x^3).
a(n) = (-1)^floor(n/2)/2+(-1)^n/2.
a(n) = cos(Pi*n/2)/2 + sin(Pi*n/2)/2 + cos(Pi*n)/2.
a(n) = -a(n-1)-a(n-2)-a(n-3) for n>2 with a(0)=1, a(1)=a(2)=0. - Jaume Oliver Lafont, Dec 05 2008