OFFSET
0,6
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-3,-4,-2).
FORMULA
a(4*k) = 1;
a(4*k+1) = (-4)^k - 1;
a(4*k+2) = -2*a(4*k+1) - 1 = -2*(-4)^k + 1;
a(4*k+3) = 2*a(4*k+1) + 1 = 2*(-4)^k - 1.
From Colin Barker, Nov 16 2018: (Start)
G.f.: (1 + 3*x + 3*x^2) / ((1 + x)*(1 + 2*x + 2*x^2)).
a(n) = (-1)^n + i/2*((-1-i)^n - (-1+i)^n), where i=sqrt(-1).
a(n) = -3*a(n-1) - 4*a(n-2) - 2*a(n-3) for n>2. (End)
MAPLE
seq(factorial(n)*coeff(series((1+sin(x))/exp(x), x=0, 48), x, n), n=0..47);
MATHEMATICA
With[{nn=50}, CoefficientList[Series[(1+Sin[x])/Exp[x], {x, 0, nn}], x] Range[ 0, nn]!] (* or *) LinearRecurrence[{-3, -4, -2}, {1, 0, -1}, 50] (* Harvey P. Dale, Jul 21 2021 *)
PROG
(PARI) Vec((1 + 3*x + 3*x^2) / ((1 + x)*(1 + 2*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Nov 16 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paolo P. Lava, Nov 16 2018
STATUS
approved