login
Number A(n,k) of tilings of a k X n rectangle using 1 X 1 squares and 2 X 2 squares; square array A(n,k), n>=0, k>=0, read by antidiagonals.
12

%I #40 Jan 15 2019 19:16:38

%S 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,3,3,1,1,1,1,5,5,5,1,1,1,1,8,11,11,

%T 8,1,1,1,1,13,21,35,21,13,1,1,1,1,21,43,93,93,43,21,1,1,1,1,34,85,269,

%U 314,269,85,34,1,1,1,1,55,171,747,1213,1213,747,171,55,1,1

%N Number A(n,k) of tilings of a k X n rectangle using 1 X 1 squares and 2 X 2 squares; square array A(n,k), n>=0, k>=0, read by antidiagonals.

%H Alois P. Heinz, <a href="/A245013/b245013.txt">Antidiagonals n = 0..45, flattened</a>

%H R. J. Mathar, <a href="https://arxiv.org/abs/1609.03964">Tiling n x m rectangles with 1 x 1 and s x s squares</a>, arXiv:1609.03964 [math.CO], 2016.

%H J. Nilsson, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Nilsson/nilsson15.html">On Counting the Number of Tilings of a Rectangle with Squares of Size 1 and 2</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.2.

%e A(3,3) = 5:

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

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

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

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

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 2, 3, 5, 8, 13, 21, ...

%e 1, 1, 3, 5, 11, 21, 43, 85, ...

%e 1, 1, 5, 11, 35, 93, 269, 747, ...

%e 1, 1, 8, 21, 93, 314, 1213, 4375, ...

%e 1, 1, 13, 43, 269, 1213, 6427, 31387, ...

%e 1, 1, 21, 85, 747, 4375, 31387, 202841, ...

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

%p if m>0 then b(n-m, map(x->x-m, l))

%p elif n=0 then 1

%p else for k while l[k]>0 do od; b(n, subsop(k=1, l))+

%p `if`(n>1 and k<nops(l) and l[k+1]=0,

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

%p fi

%p end:

%p A:= (n, k)-> `if`(min(n, k)<2, 1, b(max(n, k), [0$min(n, k)])):

%p seq(seq(A(n, d-n), n=0..d), d=0..14);

%t b[n_, l_] := b[n, l] = Module[{m=Min[l], k}, If[m>0, b[n-m, l-m], If[n == 0, 1, k=Position[l, 0, 1, 1][[1, 1]]; b[n, ReplacePart[l, k -> 1]] + If[n>1 && k<Length[l] && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 2, k+1 -> 2}]], 0]]]]; A[n_, k_] := If[Min[n, k]<2, 1, b[Max[n, k], Table[0, {Min[n, k]}]]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* _Jean-François Alcover_, Dec 11 2014, after _Alois P. Heinz_ *)

%Y Columns (or rows) k=0+1,2-10 give: A000012, A000045(n+1), A001045(n+1), A054854, A054855, A063650, A063651, A063652, A063653, A063654.

%Y Main diagonal gives A063443.

%K nonn,tabl

%O 0,13

%A _Alois P. Heinz_, Sep 16 2014