OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = (10*n + 17 + 19*(-1)^n)/4. - Jon E. Schoenfield, Jun 24 2010
G.f.: x*(2+12*x-9*x^2)/((1+x)*(1-x)^2). - Bruno Berselli, Feb 28 2012
E.g.f.: (1/4)*(19 - 36*exp(x) + (17 + 10*x)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 15 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = 13/36 + sqrt((5+sqrt(5))/10)*Pi/5 - log(phi)/sqrt(5), where phi is the golden ratio (A001622). - Amiram Eldar, Feb 23 2023
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {2, 14, 7}, 30] (* Vincenzo Librandi, Feb 28 2012 *)
PROG
(Magma) I:=[2, 14, 7]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Feb 28 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 20 2009
STATUS
approved