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
G.f.: x*(4*x^2 + 5*x + 2) / ((x+1)*(x-1)^2).
a(n) = (22*n - (-1)^n - 3)/4 - 3. [Bruno Berselli, Jan 05 2013, modified Jul 08 2015]
E.g.f.: 4 + ((22*x - 15)*exp(x) - exp(-x))/4. - David Lovler, Sep 04 2022
MATHEMATICA
Select[Range[310], MemberQ[{2, 7}, Mod[#, 11]]&] (* Ray Chandler, Jul 07 2015 *)
LinearRecurrence[{1, 1, -1}, {2, 7, 13}, 57] (* Ray Chandler, Jul 07 2015 *)
Rest[CoefficientList[Series[(4*x^2+5*x+2)*x/((x+1)*(x-1)^2), {x, 0, 57}], x]] (* Ray Chandler, Jul 07 2015 *)
PROG
(Magma) [(22*n-(-1)^n-3)/4-3: n in [1..60]]; // Bruno Berselli, Jul 08 2015
(PARI) a(n)=(22*n-(-1)^n-3)/4-3 \\ Charles R Greathouse IV, Jul 09 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 26 2009
EXTENSIONS
Definition corrected by Editors of the OEIS, Jul 07 2015
STATUS
approved