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.

A131079 Periodic sequence (2, 2, 2, 1, 0, 0, 0, 1).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Second column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=105; [ [2, 2, 2, 1, 0, 0, 0, 1][(n-1) mod 8 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{2,2,2,1,0,0,0,1}] (* Harvey P. Dale, Mar 04 2020 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%8; print1(if(r<3, 2, if(r==3||r==7, 1, 0)), ","))}
    

Formula

a(n) = a(n-8).
G.f.: x*(2-x^3+x^4)/((1-x)*(1+x^4)).