OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4); a(1)=0, a(2)=-1, a(3)=a(4)=-2. - Harvey P. Dale, Aug 02 2011
From Elmo R. Oliveira, Apr 01 2026: (Start)
O.g.f.: -x^2*(x^2 - 3*x + 1)/((2*x - 1)*(x - 1)^3).
E.g.f.: -(1 + x*(x + 2)*exp(x) - exp(2*x))/2. (End)
MATHEMATICA
Table[2^n-n*(n+1), {n, 50}]/2 (* Vladimir Joseph Stephan Orlovsky, Apr 25 2010 *)
LinearRecurrence[{5, -9, 7, -2}, {0, -1, -2, -2}, 50] (* Harvey P. Dale, Aug 02 2011 *)
PROG
(Magma) [2^(n-1) - n*(n+1)/2: n in [1..35]]; // Vincenzo Librandi, Jul 28 2011
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
EXTENSIONS
More terms from Vladimir Joseph Stephan Orlovsky, Apr 25 2010
STATUS
approved
