A159616 Expansion of (1-x)/(1-5*x-2*x^2+8*x^3).
1, 4, 22, 110, 562, 2854, 14514, 73782, 375106, 1906982, 9694866, 49287446, 250571106, 1273871494, 6476200114, 32924174710, 167382301826, 850950257638, 4326122494162, 21993454571478, 111811915784610, 568437508112710
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- M. Katz, C. Stenson, Tiling a 2xn-board with squares and dominoes, J. Int. Seq. 12 (2009) # 09.2.2.
- Index entries for linear recurrences with constant coefficients, signature (5,2,-8).
Programs
-
GAP
a:=[1,4,22];; for n in [4..40] do a[n]:=5*a[n-1]+2*a[n-2]-8*a[n-3]; od; a; # G. C. Greubel, Oct 27 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/(1-5*x-2*x^2+8*x^3) )); // G. C. Greubel, Oct 27 2019 -
Maple
seq(coeff(series((1-x)/(1-5*x-2*x^2+8*x^3), x, n+1), x, n), n=0..40); # G. C. Greubel, Oct 27 2019~
-
Mathematica
CoefficientList[Series[(1-x)/(1-5*x-2*x^2+8*x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 11 2012 *) LinearRecurrence[{5,2,-8}, {1,4,22}, 30] (* Harvey P. Dale, Dec 22 2013 *)
-
PARI
my(x='x+O('x^40)); Vec((1-x)/(1-5*x-2*x^2+8*x^3)) \\ G. C. Greubel, Oct 27 2019
-
Sage
def A159616_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P((1-x)/(1-5*x-2*x^2+8*x^3)).list() A159616_list(40) # G. C. Greubel, Oct 27 2019
Formula
G.f.: (1-x)/(1-5*x-2*x^2+8*x^3).
a(n) = 5*a(n-1) + 2*a(n-2) - 8*a(n-3) for n > 2 with a(0)=1, a(1)=4, a(2)=22. - Harvey P. Dale, Dec 22 2013
Comments