OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (4,2,-12,3).
FORMULA
a(n) = 4*a(n-1) + 2*a(n-2) - 12*a(n-3) + 3*a(n-4).
a(n) = ((2+sqrt(3))^n + (2-sqrt(3))^n - (sqrt(3))^n - (-sqrt(3))^n)/4.
G.f.: x*(1-2*x+3*x^2)/((1-3*x^2)(1-4*x+x^2)).
E.g.f. : exp(x)*sinh(x)*cosh(sqrt(3)*x).
a(n) = (2*ChebyshevT(n, 2) - (1+(-1)^n)*3^(n/2))/4 = (A001075(n) - A254006(n))/2. - G. C. Greubel, Oct 10 2022
MAPLE
seq((2*simplify(ChebyshevT(n, 2)) - (1+(-1)^n)*3^(n/2))/4, n = 0..30); # G. C. Greubel, Oct 10 2022
MATHEMATICA
LinearRecurrence[{4, 2, -12, 3}, {0, 1, 2, 13}, 30] (* Harvey P. Dale, Feb 01 2014 *)
PROG
(Magma) I:=[0, 1, 2, 13]; [n le 4 select I[n] else 4*Self(n-1)+2*Self(n-2)-12*Self(n-3)+3*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Feb 13 2014
(SageMath)
def A084156(n): return (chebyshev_T(n, 2) - ((n+1)%2)*3^(n/2))/2
[A084156(n) for n in range(31)] # G. C. Greubel, Oct 10 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, May 16 2003
STATUS
approved