OFFSET
0,4
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,-1,-1)
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.
EXAMPLE
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.
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 *)
PROG
(PARI) x='x+O('x^50); Vec((1 + x)*(1 - x)/(1 - x + x^2 + x^3)) \\ G. C. Greubel, Feb 22 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Gary W. Adamson, Jan 22 2011
STATUS
approved