OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = 8*n - 20 for n >= 4. - Nathaniel Johnston, May 27 2011
G.f.: (-2*x*(-1 + x + x^2 - 7*x^3 + 2*x^4))/(-1 + x)^2. - Alexander R. Povolotsky, Oct 18 2010
E.g.f.: 20 + 4*exp(x)*(2*x - 5) + x*(42 + (9 - 2*x)*x)/3. - Stefano Spezia, Jan 03 2023
Sum_{n>=4} (-1)^n/a(n) = (4-Pi)/16. - Amiram Eldar, Jan 08 2023
MAPLE
A181389 := proc(n) local s: s:=[2, 2, 0]: if(n<=3)then return s[n]: fi: return 8*n-20: end: seq(A181389(n), n=1..100); # Nathaniel Johnston, May 27 2011
MATHEMATICA
CoefficientList[Series[(-2*x*(-1 + x + x^2 - 7*x^3 + 2*x^4))/(-1 + x)^2, {x, 0, 50}], x] (* G. C. Greubel, Feb 22 2017 *)
LinearRecurrence[{2, -1}, {2, 2, 0, 12, 20}, 70] (* Harvey P. Dale, Feb 13 2022 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((-2*x*(-1 + x + x^2 - 7*x^3 + 2*x^4))/(-1 + x)^2) \\ G. C. Greubel, Feb 22 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Oct 17 2010
STATUS
approved