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.

A180735 Expansion of (1+x)*(1-x)/(1 - x + x^2 + x^3).

Original entry on oeis.org

1, 1, -1, -3, -3, 1, 7, 9, 1, -15, -25, -11, 29, 65, 47, -47, -159, -159, 47, 365, 477, 65, -777, -1319, -607, 1489, 3415, 2533, -2371, -8319, -8481, 2209, 19009, 25281, 4063, -40227, -69571, -33407, 76391, 179369, 136385
Offset: 0

Views

Author

Gary W. Adamson, Jan 22 2011

Keywords

Comments

Let r1 be the tribonacci constant A058265, and r2 = -0.41964... + 0.6062...*i, where i = sqrt(-1), and r3 the complex conjugate of r2, the other constants also defined in A058265.
A formula in terms of cubic roots is known for r1 (see A058265), and Re(r2) = Re(r3) = (1-r1)/2 and Im(r2) = -Im(r3) = sqrt( 1/r1-Re^2(r2)).
Then the denominator of the g.f. is (x+r1)*(x+r2)*(x+r3) = x^3 + x^2 + 1 - x,
and the Binet formula is a(n) = (r3^2-1)*(-r3)^(-n-1)/( (r2-r3)*(r1-r3) ) -(r2^2-1)*(-r2)^(-n-1)/( (r2-r3)*(r1-r2) ) +(r1^2-1)*(-r1)^(-n-1)/( (r1-r2)*(r1-r3) ). - R. J. Mathar, based on input from Alexander R. Povolotsky and T. D. Noe

Examples

			a(6) = 7 = (1, 1, 1, -1, -3, -3, 1) dot (-2, 0, 2, 0, -2, 0, 1) = (-2, 0, 2, 0, 6, 0, 1) = 7.
		

Programs

  • Mathematica
    CoefficientList[Series[(1 + x)*(1 - x)/(1 - x + x^2 + x^3), {x, 0, 50}], x] (* G. C. Greubel, Feb 22 2017 *)
    LinearRecurrence[{1,-1,-1},{1,1,-1},50] (* Harvey P. Dale, Aug 10 2021 *)
  • PARI
    x='x+O('x^50); Vec((1 + x)*(1 - x)/(1 - x + x^2 + x^3)) \\ G. C. Greubel, Feb 22 2017

Formula

INVERT transform of (1, 0, -2, 0, 2, 0, -2, 0, 2, 0, ...) = INVERT transform of (1 - 2x^2 + 2x^4 - 2x^6 + 2x^8 - ...).
a(n) = a(n-1) - a(n-2) - a(n-3), n > 3.
a(n) = (-1)^n*(A057597(n+2) - A057597(n)). - R. J. Mathar, Jan 27 2011