OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2, 1, 7, -1).
FORMULA
G.f.: (1+2*x-x^2)/(1-2*x-x^2-7*x^3+x^4).
a(0)=1, a(1)=4, a(2)=8, a(3)=27, a(n)=2*a(n-1)+a(n-2)+7*a(n-3)- a(n-4) [From Harvey P. Dale, Jul 12 2011]
MATHEMATICA
LinearRecurrence[{2, 1, 7, -1}, {1, 4, 8, 27}, 30] (* or *) CoefficientList[ Series[ (1+2x-x^2)/(1-2x-x^2-7x^3+x^4), {x, 0, 30}], x] (* Harvey P. Dale, Jul 12 2011 *)
PROG
(PARI) a(n)=sum(k=0, n, polcoeff((1+3*x+x^2+x*O(x^k))^(n-k\2), k))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 21 2004
STATUS
approved