|
|
A159616
|
|
Expansion of (1-x)/(1-5*x-2*x^2+8*x^3).
|
|
2
|
|
|
1, 4, 22, 110, 562, 2854, 14514, 73782, 375106, 1906982, 9694866, 49287446, 250571106, 1273871494, 6476200114, 32924174710, 167382301826, 850950257638, 4326122494162, 21993454571478, 111811915784610, 568437508112710
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Number of tilings of a 2 X n board with squares of 1 color and dominoes of 2 colors if n > 2. The number of tilings is 3 if n=1, and 17 if n=2.
a(n) = element(1,2) in A^n, where A is the 7 X 7 matrix defined by A(1,i) = A(7,i) = A(i,1) = A(i,7) = A(i,i) = A(i,7-i+1) = 1, and A(i,j) = 0 otherwise. - Lechoslaw Ratajczak, Jan 02 2017
|
|
LINKS
|
|
|
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
|
|
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 *)
|
|
PROG
|
(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
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/(1-5*x-2*x^2+8*x^3) )); // G. C. Greubel, Oct 27 2019
(Sage)
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-x)/(1-5*x-2*x^2+8*x^3)).list()
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|