OFFSET
0,3
COMMENTS
Let A(r,n) count the total number of ordered arrangements of an n+r tiling of r red squares and white tiles of total length n, where the individual tile lengths can range from 1 to n. A(r,0) corresponds to a tiling of r red squares only. Let A_1(r,n) = Sum_{j=0..n} A(r,j). Then the expansion of 1/(1-2*x-x^3+x^4) = A_1(0,n) + A_1(1,n-3) + A_1(2, n-6) + ..., which generates a(n) without the initial 1. - Gregory L. Simay, May 24 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Jarib R. Acosta, Yadira Caicedo, Juan P. Poveda, José L. Ramírez, Mark Shattuck, Some New Restricted n-Color Composition Functions, J. Int. Seq., Vol. 22 (2019), Article 19.6.4.
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 888
Index entries for linear recurrences with constant coefficients, signature (2,0,1,-1).
FORMULA
G.f.: (1-x)*(1-x^3)/(1-2*x-x^3+x^4).
a(n) = 2*a(n-1) + a(n-3) - a(n-4), with a(0)=1, a(1)=1, a(2)=2, a(3)=4, a(4)=9.
a(n) = Sum_{alpha=RootOf(1 -2*z -z^3 +z^4)} (1/643)*(168 - 74*alpha + 53*alpha^2 - 93*alpha^3)*alpha^(-1-n).
MAPLE
spec := [S, {S=Sequence(Prod(Sequence(Z), Sequence(Prod(Z, Z, Z)), Z))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
CoefficientList[Series[(1-x)(1-x^3)/(1 -2x -x^3 +x^4), {x, 0, 30}], x] (* Michael De Vlieger, Jun 14 2018 *)
LinearRecurrence[{2, 0, 1, -1}, {1, 1, 2, 4, 9}, 30}] (* G. C. Greubel, Oct 14 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-x)*(1-x^3)/(1-2*x-x^3+x^4)) \\ G. C. Greubel, Oct 14 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)*(1-x^3)/(1-2*x-x^3+x^4) )); // G. C. Greubel, Oct 14 2019
(Sage)
def A052908_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-x)*(1-x^3)/(1-2*x-x^3+x^4) ).list()
A052908_list(30) # G. C. Greubel, Oct 14 2019
(GAP) a:=[1, 2, 4, 9];; for n in [5..30] do a[n]:=2*a[n-1]+a[n-3]-a[n-4]; od; Concatenation([1], a); # G. C. Greubel, Oct 14 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved