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.

A123972 a(n) = n^3 - n^2 - 2*n + 1.

Original entry on oeis.org

1, -1, 1, 13, 41, 91, 169, 281, 433, 631, 881, 1189, 1561, 2003, 2521, 3121, 3809, 4591, 5473, 6461, 7561, 8779, 10121, 11593, 13201, 14951, 16849, 18901, 21113, 23491, 26041, 28769, 31681, 34783, 38081, 41581, 45289, 49211, 53353, 57721, 62321, 67159, 72241
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 30 2006

Keywords

Comments

a(n) is the determinant of the 3 X 3 matrix {{n,-1,0 },{-1,n,-1},{0,-1,n-1}}.

Crossrefs

Cf. A162997.

Programs

  • Magma
    I:=[1, -1, 1, 13]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 27 2012
  • Maple
    with(linalg): M:=n->matrix(3,3,[n,-1,0,-1,n,-1,0,-1,n-1]): seq(det(M(n)),n=0..42);
  • Mathematica
    CoefficientList[Series[(1-5*x+11*x^2-x^3)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 27 2012 *)
  • PARI
    a(n)=n^3-n^2-2*n+1 \\ Charles R Greathouse IV, Jun 30 2011
    

Formula

a(n) = (n + 2*cos(2*Pi/7)) * (n + 2*cos(4*Pi/7)) * (n + 2*cos(6*Pi/7)). Cf. 3rd column from the left in the array of A162997. - Gary W. Adamson, Jul 23 2009
a(n) equals the lower right term in M^3, M is the 2 X 2 matrix {{1, n-2}, {1, n-1}}. - Gary W. Adamson, Jun 29 2011
Starting (1, 13, 41, ...) = the binomial transform of (1, 12, 16, 6). - Gary W. Adamson, Jun 29 2011
G.f.: (1 - 5*x + 11*x^2 - x^3)/(1-x)^4. - Colin Barker, Jan 29 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 27 2012

Extensions

Edited by N. J. A. Sloane, Nov 01 2006 and Nov 24 2006