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.

A156283 Period 6: repeat [1, 2, 4, -4, -2, -1].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Feb 07 2009

Keywords

Crossrefs

Cf. A141425.

Programs

  • Magma
    &cat [[1, 2, 4, -4, -2, -1]^^20]; // Wesley Ivan Hurt, Jun 23 2016
  • Maple
    A156283:=n->[1, 2, 4, -4, -2, -1][(n mod 6)+1]: seq(A156283(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
  • Mathematica
    PadRight[{}, 80, {1,2,4,-4,-2,-1}] (* or *) LinearRecurrence[{-1,-1,-1,-1,-1}, {1,2,4,-4,-2}, 80] (* Harvey P. Dale, May 29 2013 *)

Formula

a(n) == A141425(n) (mod 9). - Paul Curtz, Feb 08 2009
a(n) = ( (2*A141425(n)) mod 9) - A141425(n). - Paul Curtz, Feb 08 2009
G.f.: (1+x^4+3*x^3+7*x^2+3*x)/( (x+1)*(x^2-x+1)*(x^2+x+1) ). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009]
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) = 0 for n>4.
a(n) = cos(n*Pi) + 2*sqrt(3)*cos(n*Pi/6)*sin(n*Pi/6) - sqrt(3)*cos(n*Pi/2)*sin(n*Pi/6) + 3*sin(n*Pi/6)*sin(n*Pi/2). (End)