OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,1,-4).
FORMULA
a(n) = 4a(n-1) + a(n-2) - 4a(n-3).
G.f.: x*(2+x) / ( (x-1)*(4*x-1)*(1+x) ). - R. J. Mathar, Nov 21 2011
a(n) = floor(3*4^n/5). - Christian Krause, May 30 2026
E.g.f.: (3*(cosh(4*x) - cosh(x) + sinh(4*x)) - 2*sinh(x))/5. - Stefano Spezia, May 31 2026
MATHEMATICA
LinearRecurrence[{4, 1, -4}, {2, 9, 38}, 40] (* Vincenzo Librandi, Jun 22 2012 *)
PROG
(Magma) I:=[2, 9, 38]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
CROSSREFS
KEYWORD
nonn,base,easy,changed
AUTHOR
STATUS
approved
