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.

A131017 Period 6: repeat [1, 1, 2, -1, 2, 1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Sep 23 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[{1, 1, 2, -1, 2, 1}, {20}]] (* Wesley Ivan Hurt, Jun 24 2022 *)
    PadRight[{},120,{1,1,2,-1,2,1}] (* Harvey P. Dale, Oct 10 2023 *)

Formula

|a(n)| = A131718(n).
a(n) = A131717(n+1) - A131717(n).
O.g.f.: (1+x+2*x^2-x^3+2*x^4+x^5)/((1-x)*(1+x)*(x^2+x+1)*(x^2-x+1)). - R. J. Mathar, Jul 07 2008
a(n) = (3+2*(-1)^n+cos(n*Pi/3)-3*cos(n*Pi/3)^2+3*sin(n*Pi/3)^2)/3. - Wesley Ivan Hurt, Jun 24 2022

Extensions

Edited by R. J. Mathar, Jul 07 2008