OFFSET
0,3
COMMENTS
The ratio a(n+1)/a(n) approaches 2.1846664233601828969043938181074777323...
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,4,-4,2).
FORMULA
G.f.: 1/(1 - x - 4*x^2 + 4*x^3 - 2*x^4).
a(0)=1, a(1)=1, a(2)=5, a(3)=5; for n>3, a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) + 2*a(n-4). - Harvey P. Dale, Oct 10 2014
MAPLE
seq(coeff(series(1/(1-x-4*x^2+4*x^3-2*x^4), x, n+1), x, n), n = 0..30); # G. C. Greubel, Dec 04 2019
MATHEMATICA
CoefficientList[Series[-1/(-1 +x +4x^2 -4x^3 +2x^4), {x, 0, 30}], x] (* or *) LinearRecurrence[{1, 4, -4, 2}, {1, 1, 5, 5}, 40] (* Harvey P. Dale, Oct 10 2014 *)
PROG
(PARI) my(x='x+O('x^30)); Vec(1/(1-x-4*x^2+4*x^3-2*x^4)) \\ G. C. Greubel, Dec 04 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1-x-4*x^2+4*x^3-2*x^4) )); // G. C. Greubel, Dec 04 2019
(Sage)
def A175713_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-x-4*x^2+4*x^3-2*x^4) ).list()
A175713_list(30) # G. C. Greubel, Dec 04 2019
(GAP) a:=[1, 1, 5, 5];; for n in [5..30] do a[n]:=a[n-1]+4*a[n-2]-4*a[n-3] + 2*a[n-4]; od; a; # G. C. Greubel, Dec 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Dec 04 2010
STATUS
approved