OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (6,-1).
FORMULA
G.f.: 2*(2-x)/(1-6*x+x^2). - Philippe Deléham, Nov 17 2008
a(0)=4, a(1)=22, a(n) = 6*a(n-1) - a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
a(n) = 2*A038725(n+1). - R. J. Mathar, Sep 27 2014
a(n) = ( (5 + 4*sqrt(2))*(3 + 2*sqrt(2))^n - (5 - 4*sqrt(2))*(3 - 2*sqrt(2))^n )/(2*sqrt(2)). - Colin Barker, Oct 13 2015
From G. C. Greubel, Jun 28 2022: (Start)
a(n) = 2*( 2*ChebyshevU(n, 3) - ChenyshevU(n-1, 3) ).
E.g.f.: 2*exp(3*x)*( 2*cosh(2*sqrt(2)*x) + (5/(2*sqrt(2)))*sinh(2*sqrt(2)*x) ). (End)
MATHEMATICA
CoefficientList[Series[(4-2x)/(1-6x+x^2), {x, 0, 33}], x] (* Vincenzo Librandi, Oct 13 2015 *)
LinearRecurrence[{6, -1}, {4, 22}, 30] (* Harvey P. Dale, Mar 25 2016 *)
PROG
(PARI) Vec((4-2*x)/(1-6*x+x^2) + O(x^40)) \\ Colin Barker, Oct 13 2015
(Magma) I:=[4, 22, 128]; [n le 3 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Oct 13 2015
(SageMath) [2*(2*chebyshev_U(n, 3) - chebyshev_U(n-1, 3)) for n in (0..30)] # G. C. Greubel, Jun 28 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lambert Klasen (lambert.klasen(AT)gmx.de), Nov 24 2004
STATUS
approved