A116694
Array read by antidiagonals: number of ways of dividing an n X m rectangle into integer-sided rectangles.
Original entry on oeis.org
1, 2, 2, 4, 8, 4, 8, 34, 34, 8, 16, 148, 322, 148, 16, 32, 650, 3164, 3164, 650, 32, 64, 2864, 31484, 70878, 31484, 2864, 64, 128, 12634, 314662, 1613060, 1613060, 314662, 12634, 128, 256, 55756, 3149674, 36911922, 84231996, 36911922, 3149674, 55756, 256
Offset: 1
Helena Verrill (verrill(AT)math.lsu.edu), Feb 23 2006
Array begins:
1, 2, 4, 8, 16, 32, ...
2, 8, 34, 148, 650, 2864, ...
4, 34, 322, 3164, 31484, 314662, ...
8, 148, 3164, 70878, 1613060, 36911922, ...
16, 650, 31484, 1613060, 84231996, 4427635270, ...
32, 2864, 314662, 36911922, 4427635270, 535236230270, ...
For irreducible or "tight" pavings, see also
A285357.
-
M:= proc(n) option remember; local k; k:= 2^(n-2);
`if`(n=1, Matrix([2]), Matrix(2*k, (i, j)->`if`(i<=k,
`if`(j<=k, M(n-1)[i, j], B(n-1)[i, j-k]),
`if`(j<=k, B(n-1)[i-k, j], 2*M(n-1)[i-k, j-k]))))
end:
B:= proc(n) option remember; local k; k:=2^(n-2);
`if`(n=1, Matrix([1]), Matrix(2*k, (i,j)->`if`(i<=k,
`if`(j<=k, B(n-1)[i, j], B(n-1)[i, j-k]),
`if`(j<=k, B(n-1)[i-k, j], M(n-1)[i-k, j-k]))))
end:
A:= proc(n, m) option remember; `if`(n=0 or m=0, 1, `if`(m>n, A(m, n),
add(i, i=map(rhs, [op(op(2, M(m)^(n-1)))]))))
end:
seq(seq(A(n, 1+d-n), n=1..d), d=1..12); # Alois P. Heinz, Dec 13 2012
-
M[n_] := M[n] = Module[{k = 2^(n-2)}, If[n == 1, {{2}}, Table[If[i <= k, If[j <= k, M[n-1][[i, j]], B[n-1][[i, j-k]]], If[j <= k, B[n-1][[i-k, j]], 2*M[n-1][[i-k, j-k]]]], {i, 1, 2k}, {j, 1, 2k}]]]; B[n_] := B[n] = Module[{k = 2^(n-2)}, If[n == 1, {{1}}, Table[If[i <= k, If[j <= k, B[n-1][[i, j]], B[n-1][[i, j-k]]], If[j <= k, B[n-1][[i-k, j]], M[n-1][[i-k, j-k]]]], {i, 1, 2k}, {j, 1, 2k}]]]; A[0, 0] = 1; A[n_ , m_ ] /; m>n := A[m, n]; A[n_ , m_ ] :=MatrixPower[M[m], n-1] // Flatten // Total; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 12}] // Flatten (* Jean-François Alcover, Feb 23 2015, after Alois P. Heinz *)
-
A116694(m,n)=#fill(m,n) \\ where fill() below computes all tilings. - M. F. Hasler, Jan 22 2018
fill(m,n,A=matrix(m,n),i=1,X=1,Y=1)={while((Y>n&&X++&&!Y=0)||A[X,Y], X>m&&return([A]); Y++); my(N=n,L=[]); for(x=X,m, A[x,Y]&&break; for(y=Y,N, if(A[x,y],for(j=y,N,for(k=X,x-1,A[k,j]=0));N=y-1;break); for(j=X,x,A[j,y]=i); L=concat(L,fill(m,n,A,i+1,X,y+1))); x
A182275
Number of ways of dividing an n X n square into rectangles of integer side lengths.
Original entry on oeis.org
1, 1, 8, 322, 70878, 84231996, 535236230270, 18100579400986674, 3250879178100782348462, 3097923464622249063718465240, 15657867573050419014814618149422562, 419678195343896524683571751908598967042082, 59647666241586874002530830848160043213559146735474
Offset: 0
For n=2 the a(2) = 8 ways to divide are:
._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| | | | | |_ _| | |_| |_| | |_ _| |_|_| |_|_|
|_ _| |_|_| |_ _| |_|_| |_|_| |_|_| |_ _| |_|_|
A333476
Triangle read by rows: T(n,k) gives the number of ways to partition an n X k grid into rectangles of integer side lengths with 0 <= k <= n.
Original entry on oeis.org
1, 1, 1, 1, 2, 8, 1, 4, 34, 322, 1, 8, 148, 3164, 70878, 1, 16, 650, 31484, 1613060, 84231996, 1, 32, 2864, 314662, 36911922, 4427635270, 535236230270, 1, 64, 12634, 3149674, 846280548, 233276449488, 64878517290010, 18100579400986674
Offset: 0
Triangle begins:
n\k| 0 1 2 3 4 5 6
---+--------------------------------------------------------
0| 1;
1| 1, 1;
2| 1, 2, 8;
3| 1, 4, 34, 322;
4| 1, 8, 148, 3164, 70878;
5| 1, 16, 650, 31484, 1613060, 84231996;
6| 1, 32, 2864, 314662, 36911922, 4427635270, 535236230270;
...
Columns 0-10 are given by:
A000012,
A011782,
A034999,
A208215,
A220297,
A220298,
A220299,
A220300,
A220301,
A220302,
A220303.
-
M:= proc(n) option remember; local k; k:= 2^(n-2);
`if`(n=1, Matrix([2]), Matrix(2*k, (i, j)->`if`(i<=k,
`if`(j<=k, M(n-1)[i, j], B(n-1)[i, j-k]),
`if`(j<=k, B(n-1)[i-k, j], 2*M(n-1)[i-k, j-k]))))
end:
B:= proc(n) option remember; local k; k:=2^(n-2);
`if`(n=1, Matrix([1]), Matrix(2*k, (i, j)->`if`(i<=k,
`if`(j<=k, B(n-1)[i, j], B(n-1)[i, j-k]),
`if`(j<=k, B(n-1)[i-k, j], M(n-1)[i-k, j-k]))))
end:
T:= proc(n, m) option remember; `if`((s-> 0 in s or s={1})(
{n, m}), 1, `if`(m>n, T(m, n), add(i, i=map(rhs,
[op(op(2, M(m)^(n-1)))]))))
end:
seq(seq(T(n, k), k=0..n), n=0..8); # Alois P. Heinz, Mar 23 2020
-
M[n_] := M[n] = Module[{k = 2^(n - 2)}, If[n == 1, {{2}}, Table[If[i <= k, If[j <= k, M[n - 1][[i, j]], B[n - 1][[i, j - k]]], If[j <= k, B[n - 1][[i - k, j]], 2 M[n - 1][[i - k, j - k]]]], {i, 1, 2k}, {j, 1, 2k}]]];
B[n_] := B[n] = Module[{k = 2^(n - 2)}, If[n == 1, {{1}}, Table[If[i <= k, If[j <= k, B[n - 1][[i, j]], B[n - 1][[i, j - k]]], If[j <= k, B[n - 1][[i - k, j]], M[n - 1][[i - k, j - k]]]], {i, 1, 2k}, {j, 1, 2k}]]];
T[_, 0] = 1;
T[n_, k_] /; k > n := T[k, n];
T[n_, k_] := MatrixPower[M[k], n-1] // Flatten // Total;
Table[Table[T[n, k], {k, 0, n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Nov 23 2020, after Alois P. Heinz *)
A208215
Number of ways of dividing a 3 X n rectangle into rectangles of integer side lengths.
Original entry on oeis.org
1, 4, 34, 322, 3164, 31484, 314662, 3149674, 31544384, 315981452, 3165414034, 31710994234, 317682195692, 3182564368244, 31883205466534, 319408833724882, 3199866987994304, 32056562443839284, 321145602837871522, 3217266324544621714, 32230871396722195484
Offset: 0
For n=1 the a(1) = 4 ways to divide are:
._ _ _ _
|_| |_| | | | |
|_| | | |_| | |
|_| |_| |_| |_|
-
Join[{1}, LinearRecurrence[{15, -55, 51}, {4, 34, 322}, 20]] (* Bruno Berselli, Apr 24 2012 *)
A347825
Number of ways to cut a 2 X n rectangle into rectangles with integer sides up to symmetries of the rectangle.
Original entry on oeis.org
1, 2, 6, 17, 61, 220, 883, 3597, 15232, 65130, 282294, 1229729, 5384065, 23630332, 103922707, 457561989, 2016346540, 8890227762, 39212714934, 173001054449, 763388725141, 3368934926716, 14868728620387, 65626328874621, 289666423135048, 1278582804528090
Offset: 0
The a(2) = 6 ways to partition are:
+-------+ +---+---+ +-------+
| | | | | | |
| | | | | +-------+
| | | | | | |
+-------+ +---+---+ +-------+
.
+---+---+ +-------+ +---+---+
| | | | | | | |
| +---+ +---+---+ +---+---+
| | | | | | | | |
+---+---+ +---+---+ +---+---+
- Thomas Garrison, Table of n, a(n) for n = 0..1000
- Soumil Mukherjee, Thomas Garrison, 2 X n tiling up to symmetries of a rectangle
- Index entries for linear recurrences with constant coefficients, signature (9,-19,-33,143,-63,-175,147).
-
\\ here c(n) is A034999(n)
c(n) = polcoef((1-x)*(1-3*x)/(1-6*x+7*x^2) + O(x*x^n), n)
a(n) = if(n==0, 1, (c(n) + 2*3^(n-1) + c((n+1)\2) + c((n+2)\2))/4) \\ Andrew Howroyd, Feb 08 2022
-
# By Soumil Mukherjee
# Algebraic solutions to the number of ways to tile a 2 X n grid
import sys
# Total number of tilings
# Counts different reflections and rotations as distinct
counts = [1,2,8]
def tilings(n):
if (n < len(counts)): return counts[n]
for i in range(len(counts), n+1):
val = 6 * counts[i-1] - 7 * counts[i-2]
counts.append(val)
return counts[n]
def getCounts(n):
return counts[n]
def horizontallySymmetric(i):
if i == 0: return 1
return 2 * (3 ** (i-1))
def verticallySymmetric(i):
if i == 0: return 1
k = i//2
if (i % 2 == 0):
return counts[k+1] - counts[k]
else:
return counts[k+1]
def rotationallySymmetric(i):
if i == 0: return 1
k = i//2
if (i % 2 == 0):
return 2 * counts[k]
else:
return counts[k+1]
def perfectlySymmetric(i):
if i == 0: return 1
k = i//2
if (i % 2 == 0):
return 4 * (3 ** (k-1))
else:
return 2 * (3 ** k)
def asymmetric(i):
return (
counts[i]
- verticallySymmetric(i)
- horizontallySymmetric(i)
- rotationallySymmetric(i)
+ (2 * perfectlySymmetric(i))
)
def equivalenceClasses(i):
tilings(i)
return (
(
counts[i]
+ verticallySymmetric(i)
+ horizontallySymmetric(i)
+ rotationallySymmetric(i)
)//4
)
A222659
Table a(m,n) read by antidiagonals, m, n >= 1, where a(m,n) is the number of divide-and-conquer partitions of an m X n rectangle into integer sub-rectangles.
Original entry on oeis.org
1, 2, 2, 4, 8, 4, 8, 34, 34, 8, 16, 148, 320, 148, 16, 32, 650, 3118, 3118, 650, 32, 64, 2864, 30752, 68480, 30752, 2864, 64, 128, 12634, 304618, 1525558, 1525558, 304618, 12634, 128
Offset: 1
Table begins:
1, 2, 4, 8, 16, 32, 64, ...
2, 8, 34, 148, 650, 2864, 12634, ...
4, 34, 320, 3118, 30752, 304618, 3022112, ...
8, 148, 3118, 68480, 1525558, ...
16, 650, 30752, 1525558, ...
32, 2864, 304618, ...
64, 12634, 3022112, ...
Not every partition (cf. A116694) into integer sub-rectangles is divide-and-conquer. For example, the following partition of a 3 X 3 rectangle into 5 sub-rectangles is not divide-and-conquer:
112
342
355
Showing 1-6 of 6 results.
Comments