OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,2).
FORMULA
From R. J. Mathar, Feb 23 2008: (Start)
O.g.f.: -7/(5*(2x-1)) - (4x+7)/(5*(x^2+1)).
a(n) = (7*2^n - (-1)^floor(n/2)*A010712(n+1))/5. (End)
E.g.f.: (1/5)*(7*cosh(2*x) + 7*sinh(2*x) - 7*cos(x) - 4*sin(x)). - G. C. Greubel, Oct 18 2016
MATHEMATICA
LinearRecurrence[{2, -1, 2}, {0, 2, 7}, 40] (* Vincenzo Librandi, Jun 17 2012 *)
PROG
(Magma) I:=[0, 2, 7]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-2)+2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 17 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Feb 22 2008
EXTENSIONS
More terms from R. J. Mathar, Feb 23 2008
STATUS
approved