OFFSET
0,2
COMMENTS
Binomial transform yields A079398 without the initial (0,1,1,1). - R. J. Mathar, Apr 09 2008
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,5,-1).
FORMULA
a(n) = 4*a(n-1)-6*a(n-2)+5*a(n-3)-a(n-4). - R. J. Mathar, Apr 09 2008
G.f.: (x^2 - x + 1) / (x^4 - 5*x^3 + 6*x^2 - 4*x + 1). - Alexander R. Povolotsky, Apr 08 2008
MATHEMATICA
s = ""; a = 0; b = 1; c = 1; d = 1; For[i = 0, i < 23, a = a + b; s = s <> ToString[a] <> ", "; b = b + c; c = c + d; d = d + a; i++ ]; Print[s]
LinearRecurrence[{4, -6, 5, -1}, {1, 3, 7, 15}, 40] (* Vincenzo Librandi, Jun 15 2013 *)
PROG
(Magma) [n le 4 select 2^n-1 else 4*Self(n-1)-6*Self(n-2)+5*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 15 2013
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 5, -6, 4]^n*[1; 3; 7; 15])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 03 2008
EXTENSIONS
Edited by R. J. Mathar, Apr 09 2008
Edited by Bruno Berselli, Apr 07 2011
STATUS
approved