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.

A131029 Periodic sequence (11, 5, 2, 5, 11, 14).

Original entry on oeis.org

11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14
Offset: 1

Views

Author

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

Keywords

Comments

Fifth column of triangular array T defined in A131022.

Crossrefs

Cf. A131022. Other columns of T are in A088911, A131026, A131027, A131028, A131030.

Programs

  • Magma
    m:=84; [ [11, 5, 2, 5, 11, 14][(n-1) mod 6 + 1]: n in [1..m] ];
    
  • Mathematica
    PadRight[{},120,{11,5,2,5,11,14}] (* or *) LinearRecurrence[{2,-2,1},{11,5,2},120] (* Harvey P. Dale, Jun 12 2017 *)
  • PARI
    {m=84; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==4, 11, if(r==2, 2, if(r==5, 14, 5))), ","))}
    
  • Python
    def a(n): return [11, 5, 2, 5, 11, 14][n%6]
    print([a(n) for n in range(84)]) # Michael S. Branicky, Nov 05 2021

Formula

a(1) = a(5) = 11, a(2) = a(4) = 5, a(3) = 2, a(6) = 14; for n > 6, a(n) = a(n-6).
G.f.: (11-17*x+14*x^2)/((1-x)*(1-x+x^2)).
a(n) = 3*cos((n-1)/3*Pi)-3*sqrt(3)*sin((n-1)/3*Pi)+8. - Leonid Bedratyuk, May 13 2012