This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A352589 #41 Apr 05 2025 23:12:11 %S A352589 1,1,1,1,2,8,1,3,26,163,1,5,90,1125,15623,1,8,306,7546,210690,5684228, %T A352589 1,13,1046,51055,2865581,154869092,8459468955,1,21,3570,344525, %U A352589 38879777,4207660108,460706560545,50280716999785,1,34,12190,2326760,527889422,114411435032,25111681648122,5492577770367562,1202536689448371122 %N A352589 Triangle read by rows: T(n,k) = number of tilings of a n X k rectangle using 2 X 2 and 1 X 1 tiles and dominoes, n >= 0, k = 0..n. %C A352589 For the tiling algorithm, see A351322. %C A352589 Reading the sequence {T(n,k)} for k>n, use T(k,n) instead of T(n,k). %H A352589 Liang Kai, <a href="/A352589/b352589.txt">Rows n=0..27, flattened</a> %H A352589 Gerhard Kirchner, <a href="/A352589/a352589_1.txt">Maxima code</a> %e A352589 Triangle T(n,k) begins %e A352589 n\k_0__1____2______3________4__________5___________6 %e A352589 0: 1 %e A352589 1: 1 1 %e A352589 2: 1 2 8 %e A352589 3: 1 3 26 163 %e A352589 4: 1 5 90 1125 15623 %e A352589 5: 1 8 306 7546 210690 5684228 %e A352589 6: 1 13 1046 51055 2865581 154869092 8459468955 %p A352589 b:= proc(n, l) option remember; local k, t; %p A352589 if n=0 or l=[] then 1 %p A352589 elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l)) %p A352589 else for k while l[k]>0 do od; b(n, subsop(k=1, l))+ %p A352589 `if`(n>1, b(n, subsop(k=2, l)), 0)+ `if`(k<nops(l) %p A352589 and l[k+1]=0, b(n, subsop(k=1, k+1=1, l))+ %p A352589 `if`(n>1, b(n, subsop(k=2, k+1=2, l)), 0), 0) %p A352589 fi %p A352589 end: %p A352589 T:= (n, k)-> b(max(n, k), [0$min(n, k)]): %p A352589 seq(seq(T(n, k), k=0..n), n=0..10); # _Alois P. Heinz_, May 06 2022 %t A352589 b[n_, l_List] := b[n, l] = Module[{k, t}, Which[ %t A352589 n == 0 || l == {}, 1, %t A352589 Min[l] > 0, t = Min[l]; b[n - t, l - t], %t A352589 True, For[k = 1, l[[k]] > 0, k++]; b[n, ReplacePart[l, k -> 1]] + %t A352589 If[n > 1, b[n, ReplacePart[l, k -> 2]], 0] + If[k < Length[l] && %t A352589 l[[k + 1]] == 0, b[n, ReplacePart[l, {k -> 1, k + 1 -> 1}]] + %t A352589 If[n > 1, b[n, ReplacePart[l, {k -> 2, k+1 -> 2}]], 0], 0]]]; %t A352589 T[n_, k_] := b[Max[n, k], Array[0&, Min[n, k]]]; %t A352589 Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, May 16 2022, after _Alois P. Heinz_ *) %o A352589 (Maxima) /* See Maxima code link. */ %Y A352589 Row/columns 0..5 are A000012, A000045(n+1), A052543, A226351, A352590, A352591. %Y A352589 Main diagonal is A353777. %Y A352589 Cf. A351322. %K A352589 nonn,tabl %O A352589 0,5 %A A352589 _Gerhard Kirchner_, Mar 22 2022