cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A219866 Number A(n,k) of tilings of a k X n rectangle using dominoes and straight (3 X 1) trominoes; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 4, 1, 1, 1, 2, 7, 14, 7, 2, 1, 1, 2, 15, 41, 41, 15, 2, 1, 1, 3, 30, 143, 184, 143, 30, 3, 1, 1, 4, 60, 472, 1069, 1069, 472, 60, 4, 1, 1, 5, 123, 1562, 5624, 9612, 5624, 1562, 123, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 30 2012

Keywords

Examples

			A(2,3) = A(3,2) = 4, because there are 4 tilings of a 3 X 2 rectangle using dominoes and straight (3 X 1) trominoes:
  .___.   .___.   .___.   .___.
  | | |   |___|   | | |   |___|
  | | |   |___|   |_|_|   | | |
  |_|_|   |___|   |___|   |_|_|
Square array A(n,k) begins:
  1,  1,  1,    1,     1,      1,        1,         1, ...
  1,  0,  1,    1,     1,      2,        2,         3, ...
  1,  1,  2,    4,     7,     15,       30,        60, ...
  1,  1,  4,   14,    41,    143,      472,      1562, ...
  1,  1,  7,   41,   184,   1069,     5624,     29907, ...
  1,  2, 15,  143,  1069,   9612,    82634,    707903, ...
  1,  2, 30,  472,  5624,  82634,  1143834,  15859323, ...
  1,  3, 60, 1562, 29907, 707903, 15859323, 354859954, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A000931(n+3), A129682, A219867, A219862, A219868, A219869, A219870, A219871, A219872, A219873.
Main diagonal gives: A219874.

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od;
             b(n, subsop(k=3, l))+ b(n, subsop(k=2, l))+
             `if`(k `if`(n>=k, b(n, [0$k]), b(k, [0$n])):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{k, t}, If [Max[l] > n, 0, If[ n == 0 || l == {}, 1, If[Min[l] > 0, t = Min[l]; b[n-t, l-t], k = Position[l, 0, 1][[1, 1]]; b[n, ReplacePart[l, k -> 3]] + b[n, ReplacePart[l, k -> 2]] + If[k < Length[l] && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1}]], 0] + If[k+1 < Length[l] && l[[k+1]] == 0 && l[[k+2]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1, k+2 -> 1}]], 0]]]]]; a[n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 16 2013, translated from Maple *)

A233507 Number of tilings of a 2 X 4 X n box using bricks of shape 3 X 1 X 1 and 2 X 1 X 1.

Original entry on oeis.org

1, 7, 201, 9787, 379688, 16512483, 726964790, 31549810845, 1378740599284, 60239603421159, 2630166605483293, 114886450998314920, 5017916294582867990, 219163121582772423673, 9572435654283943792842, 418094220600909382190818, 18261053013117932038592765
Offset: 0

Views

Author

Alois P. Heinz, Dec 11 2013

Keywords

Examples

			a(1) = A219866(4,2) = A129682(4) = A219866(2,4) = A219862(2) = 7:
._______. ._______. ._______. ._______.
|_____| | | |_____| | | | | | |___| | |
|_____|_| |_|_____| |_|_|_|_| |___|_|_|
._______. ._______. ._______.
| |___| | | | |___| |___|___|
|_|___|_| |_|_|___| |___|___|.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t; t:= min(l[]);
          if n=0 then 1
        elif t>0 then b(n-t, map(h->h-t, l))
        else for k while l[k]>0 do od;
             add(`if`(n>=j, b(n, s(k=j, l)), 0), j=2..3)+
             `if`(k<=6 and l[k+2]=0, b(n, s(k=1, k+2=1, l)), 0)+
             `if`(k<=4 and l[k+2]=0 and l[k+2*2]=0, b(n, s(k=1,
             k+2=1, k+2*2=1, l)), 0)+ `if`(irem(k, 2)>0 and
             l[k+1]=0, b(n, s(k=1, k+1=1, l)), 0)
          fi
        end:
    a:=n-> b(n, [0$8]): s:= subsop:
    seq(a(n), n=0..10);
  • Mathematica
    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 <= 6 && l[[k + 2]] == 0, b[n, ReplacePart[l, {k -> 1, k+2 -> 1}]], 0] + If[k <= 4 && l[[k+2]] == 0 && l[[k+2*2]] == 0, b[n, ReplacePart[l, {k -> 1, k+2 -> 1, k+2*2 -> 1}]], 0] + If[Mod[k, 2] > 0 && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1}]], 0]]]; a[n_] := b[n, Array[0&, 8]]; Table[Print[an = a[n]]; an, {n, 0, 16}] (* Jean-François Alcover, Dec 30 2013, translated from Maple *)

A202536 Number of tilings of a 4 X n rectangle using straight (3 X 1) trominoes and 2 X 2 tiles.

Original entry on oeis.org

1, 0, 1, 3, 3, 8, 21, 31, 70, 165, 286, 615, 1351, 2548, 5353, 11343, 22320, 46349, 96516, 193944, 400313, 826747, 1678540, 3453642, 7105102, 14498569, 29781633, 61158957, 125108639, 256763850, 526846289, 1079030715, 2213527089, 4540131569, 9304062828
Offset: 0

Views

Author

Alois P. Heinz, Dec 20 2011

Keywords

Examples

			a(3) = 3, because there are 3 tilings of a 4 X 3 rectangle using straight (3 X 1) trominoes and 2 X 2 tiles:
._____.  ._____.  ._._._.
| | | |  |_____|  |_____|
| | | |  | | | |  |_____|
|_|_|_|  | | | |  |_____|
|_____|  |_|_|_|  |_____|
a(4) = 3, because there are 3 tilings of a 4 X 4 rectangle using straight (3 X 1) trominoes and 2 X 2 tiles:
._._____.  ._____._.  ._._._._.
| |_____|  |_____| |  | . | . |
| | . | |  | | . | |  |___|___|
|_|___| |  | |___|_|  | . | . |
|_____|_|  |_|_____|  |___|___|
		

Crossrefs

Column k=4 of A219967.

Programs

  • Maple
    gf:= -(x^3+x-1) *(x^18 -3*x^15 +x^14 +7*x^12 -3*x^11 -11*x^9 +3*x^8 +12*x^6 -x^5 -6*x^3+1) *(x-1)^2 *(x^2+x+1)^2 / (x^30 -x^29 +x^28 -5*x^27 +5*x^26 -4*x^25 +19*x^24 -12*x^23 +8*x^22 -56*x^21 +14*x^20 -10*x^19 +119*x^18 -2*x^17 +18*x^16 -174*x^15 -19*x^14 -35*x^13 +173*x^12 +31*x^11 +44*x^10 -115*x^9 -23*x^8 -29*x^7 +48*x^6 +8*x^5 +9*x^4 -11*x^3 -x^2 -x+1):
    a:= n-> coeff(series(gf, x, n+1),x,n);
    seq(a(n), n=0..50);

Formula

G.f.: see Maple program.
Showing 1-3 of 3 results.