login
Number of tilings of a 2 X 5 X n box using bricks of shape 3 X 1 X 1 and 2 X 1 X 1.
5

%I #13 Dec 31 2013 12:38:28

%S 1,15,1062,148414,16512483,2043497465,257251613508,31941208907916,

%T 3990164870713039,498504394558488109,62237975023439983192,

%U 7773270324407375580946,970802515607358269506951,121240108673115249961266051,15141593230837339625055971170

%N Number of tilings of a 2 X 5 X n box using bricks of shape 3 X 1 X 1 and 2 X 1 X 1.

%H Alois P. Heinz, <a href="/A233509/b233509.txt">Table of n, a(n) for n = 0..40</a>

%e a(1) = A219866(5,2) = A129682(5) = A219866(2,5) = A219868(2) = 15:

%e .___. .___. .___. .___. .___. .___. .___. .___.

%e | | | |___| | | | |___| | | | |___| | | | |___|

%e | | | |___| |_|_| | | | | | | |___| |_|_| | | |

%e |_|_| |___| |___| |_|_| |_|_| |___| |___| |_|_|

%e | | | | | | | | | | | | |___| |___| |___| |___|

%e |_|_| |_|_| |_|_| |_|_| |___| |___| |___| |___|

%e .___. .___. .___. .___. .___. .___. .___.

%e | | | | | | |___| |___| | | | | | | |___|

%e |_|_| |_|_| |___| |___| |_| | | |_| | | |

%e | | | | | | | | | | | | | |_| |_| | | | |

%e | | | |_|_| | | | |_|_| | | | | | | |_|_|

%e |_|_| |___| |_|_| |___| |_|_| |_|_| |___|.

%p b:= proc(n, l) option remember; local k, t; t:= min(l[]);

%p if n=0 then 1 elif t>0 then b(n-t, map(h->h-t, l))

%p else for k while l[k]>0 do od;

%p add(`if`(n>=j, b(n, s(k=j, l)), 0), j=2..3)+

%p `if`(k<=5 and l[k+5]=0, b(n, s(k=1, k+5=1, l)), 0)+

%p `if`(irem(k, 5)>0 and l[k+1]=0, b(n, s(k=1, k+1=1, l)), 0)+

%p `if`(irem(k, 5) in [$1..3] and l[k+1]=0 and l[k+2]=0,

%p b(n, s(k=1, k+1=1, k+2=1, l)), 0)

%p fi

%p end:

%p a:=n-> b(n, [0$10]): s:=subsop:

%p seq(a(n), n=0..4);

%t b[n_, l_] := b[n, l] = Module[{k, t}, t = Min[l]; Which[n == 0, 1, t > 0, b[n-t, l-t], True, For[k = 1, l[[k]] > 0, k++]; Sum[If[n >= j, b[n, ReplacePart[l, k -> j]], 0], {j, 2, 3}] + If[k <= 5 && l[[k+5]] == 0, b[n, ReplacePart[l, {k -> 1, k+5 -> 1}]], 0] + If[Mod[k, 5] > 0 && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1}]], 0] + If[1 <= Mod[k, 5] <= 3 && l[[k+1]] == 0 && l[[k+2]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1, k+2 -> 1}]], 0]]];a[n_] := b[n, Array[0&, 10]]; Table[Print[an = a[n]]; an, {n, 0, 14}] (* _Jean-François Alcover_, Dec 30 2013, translated from Maple *)

%Y Cf. A000931, A129682, A219866, A219867, A233313, A233505, A233506, A233507.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Dec 11 2013