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.

A130848 Periodic sequence with period (2, 5, 3, -2, -5, -3).

Original entry on oeis.org

2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3, 2, 5, 3, -2, -5, -3
Offset: 0

Views

Author

Paul Curtz, Jul 21 2007

Keywords

Comments

Also binomial transform of periodic sequence with period (2, 3, -5).
Sequence is identical to its third differences.

Programs

  • Magma
    m:=105; [ [2, 5, 3, -2, -5, -3][ (n-1) mod 6 + 1 ]: n in [1..m] ]; /* Klaus Brockhaus, Jul 30 2007 */
  • Mathematica
    LinearRecurrence[{1,-1},{2,5},120] (* or *) PadRight[{},120,{2,5,3,-2,-5,-3}] (* Harvey P. Dale, Dec 27 2022 *)
  • PARI
    {m=104; a=2; b=5; print1(a=2, ",", b=5, ","); for(n=2, m, print1(c=b-a, ","); a=b; b=c)} /* Klaus Brockhaus, Jul 30 2007 */
    

Formula

For n > 1, a(n) = a(n-1) - a(n-2).
a(n) = a(n-6).
G.f.: (2+3*x)/(1-x+x^2).
a(n) = 2*cos(Pi*n/3) + (8/3)*3^(1/2)*sin(Pi*n/3). - R. J. Mathar, Nov 15 2007

Extensions

Edited by Klaus Brockhaus, Jul 30 2007