A045846
Number of distinct ways to cut an n X n square into squares with integer sides.
Original entry on oeis.org
1, 1, 2, 6, 40, 472, 10668, 450924, 35863972, 5353011036, 1500957422222, 790347882174804, 781621363452405930, 1451740730942350766748, 5064070747064013556294032, 33176273260130056822126522884, 408199838581532754602910469192704
Offset: 0
For n=3 the 6 dissections are: the full 3 X 3 square; 9 1 X 1 squares; one 2 X 2 square and five 1 X 1 squares (in 4 ways).
- Andrew Gozzard and Max Ward, Table of n, a(n) for n = 0..25 (terms 0..20 from Steve Butler).
- Steve Butler, Jason Ekstrand, Steven Osborne, Counting Tilings by Taking Walks in a Graph, A Project-Based Guide to Undergraduate Research in Mathematics, Birkhäuser, Cham (2020), see page 169.
- N. J. A. Sloane, Illustration of the first five terms of A045846 and A224239, page 1 of 4 (Each dissection from A224239 is labeled with the number of its images under the symmetry group of the square. The sum of these numbers is A045846(n).)
- N. J. A. Sloane, Illustration of the first five terms of A045846 and A224239, page 2 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- N. J. A. Sloane, Illustration of the first five terms of A045846 and A224239, page 3 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- N. J. A. Sloane, Illustration of the first five terms of A045846 and A224239, page 4 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- Ed Wynn, Exhaustive generation of Mrs Perkins's quilt square dissections for low orders, arXiv:1308.5420 [math.CO], 2013-2014.
See
A224239 for the number of inequivalent ways.
-
b:= proc(n, l) option remember; local i, k, s, 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; s:=0;
for i from k to nops(l) while l[i]=0 do s:=s+
b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)])
od; s
fi
end:
a:= n-> b(n, [0$n]):
seq(a(n), n=0..11); # Alois P. Heinz, Apr 15 2013
-
$RecursionLimit = 1000; b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[ Max[l]>n, 0, n == 0 || l == {}, 1, Min[l]>0, t = Min[l]; b[n-t, l-t], True, For[k = 1, True, k++, If[l[[k]] == 0, Break[]]]; s=0; For[i=k, i <= Length[l] && l[[i]] == 0, i++, s = s + b[n, Join[l[[1 ;; k-1]], Table[1+i-k, {i-k+1}], l[[i+1 ;; Length[l]]]]]]; s]]; a[n_] := b[n, Array[0&, n]]; Table[a[n], {n, 0, 11}] (* Jean-François Alcover, Feb 25 2015, after Alois P. Heinz *)
A224239
Number of inequivalent ways to cut an n X n square into squares with integer sides.
Original entry on oeis.org
1, 2, 3, 13, 77, 1494, 56978, 4495023, 669203528, 187623057932, 98793520541768, 97702673827558670
Offset: 1
For n=5, the illustrations (see links) show that the 77 solutions consist of:
4 dissections each with 1 image under the group of the square, for a total of 4,
2 dissections each with 2 images under the group of the square, totaling 4,
26 dissections each with 4 images under the group of the square, totaling 104, and
45 dissections each with 8 images under the group of the square, totaling 360,
for a grand total of 77 dissections with 472 images, agreeing with A045846(5) = 472.
- Don Reble, C programs for A224239
- Don Reble, Comments on the calculation of a(10)
- N. J. A. Sloane, Illustration of the first five terms, page 1 of 4 (Each dissection is labeled with the number of its images under the symmetry group of the square. The sum of these numbers is A045846(n).)
- N. J. A. Sloane, Illustration of the first five terms, page 2 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- N. J. A. Sloane, Illustration of the first five terms, page 3 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- N. J. A. Sloane, Illustration of the first five terms, page 4 of 4 (The largest squares are drawn in red. The next-largest squares, unless of size 1, are drawn in blue.)
- Ed Wynn, Exhaustive generation of Mrs Perkins's quilt square dissections for low orders, 2013; arXiv:1308.5420
A113881
Table of smallest number of squares, T(m,n), needed to tile an m X n rectangle, read by antidiagonals.
Original entry on oeis.org
1, 2, 2, 3, 1, 3, 4, 3, 3, 4, 5, 2, 1, 2, 5, 6, 4, 4, 4, 4, 6, 7, 3, 4, 1, 4, 3, 7, 8, 5, 2, 5, 5, 2, 5, 8, 9, 4, 5, 3, 1, 3, 5, 4, 9, 10, 6, 5, 5, 5, 5, 5, 5, 6, 10, 11, 5, 3, 2, 5, 1, 5, 2, 3, 5, 11, 12, 7, 6, 6, 5, 5, 5, 5, 6, 6, 7, 12, 13, 6, 6, 4, 6, 4, 1, 4, 6, 4, 6, 6, 13, 14, 8, 4, 6, 2, 3, 7, 7, 3, 2, 6, 4, 8, 14
Offset: 1
Devin Kilminster (devin(AT)27720.net), Jan 27 2006
T(n,n) = 1 (1 n X n square).
T(n,1) = n (n 1 X 1 squares).
T(6,7) = 6 (2 3 X 3, 1 4 X 4, 1 2 X 2, 2 1 X 1).
T(11,13) = 6 (1 7 X 7, 1 6 X 6, 1 5 X 5, 2 4 X 4 1 1 X 1).
Table T(m,n) begins:
: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
: 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ...
: 3, 3, 1, 4, 4, 2, 5, 5, 3, 6, ...
: 4, 2, 4, 1, 5, 3, 5, 2, 6, 4, ...
: 5, 4, 4, 5, 1, 5, 5, 5, 6, 2, ...
: 6, 3, 2, 3, 5, 1, 5, 4, 3, 4, ...
: 7, 5, 5, 5, 5, 5, 1, 7, 6, 6, ...
: 8, 4, 5, 2, 5, 4, 7, 1, 7, 5, ...
: 9, 6, 3, 6, 6, 3, 6, 7, 1, 6, ...
: 10, 5, 6, 4, 2, 4, 6, 5, 6, 1, ...
- Alois P. Heinz, Antidiagonals n = 1..350, flattened (using data from A219158)
- Bertram Felgenhauer, Filling rectangles with integer-sided squares
- Richard J. Kenyon, Tiling a rectangle with the fewest squares, Combin. Theory Ser. A 76 (1996), no. 2, 272-291.
- M. Ortolano, M. Abrate, and L. Callegaro, On the synthesis of Quantum Hall Array Resistance Standards, arXiv preprint arXiv:1311.0756 [physics.ins-det], 2013.
- Mark Walters, Rectangles as sums of squares, Discrete Math. 309 (2009), no. 9, 2913-2921.
-
(* *** Warning *** This empirical toy-program is based on the greedy algorithm. Its output was only verified for n+k <= 32. Any use outside this domain might produce only upper bounds instead of minimums. *)
nmax = 31; Clear[T];
Tmin[n_, k_] := Table[{1 + T[ c, k - c] + T[n - c, k], 1 + T[n, k - c] + T[n - c, c]}, {c, 1, k - 1}] // Flatten // Min;
Tmin2[n_, k_] := Module[{n1, n2, k1, k2}, 1 + T[n2, k1 + 1] + T[n - n1, k2] + T[n - n2, k1] + T[n1, k - k1] /. {Reduce[1 <= n1 <= n - 1 && 1 <= n2 <= n - 1 && 1 <= k1 <= k - 1 && 1 <= k2 <= k - 1 && n1 + 1 + n2 == n && k1 + 1 + k2 == k, Integers] // ToRules} // Min];
T[n_, n_] = 1;
T[n_, 1] := n;
T[1, k_] := k;
T[n_, k_ /; k > 1] /; n > k && Divisible[n, k] := n/k;
T[n_, k_ /; k > 1] /; n > k := T[n, k] = If[k >= 5 && n >= 6 && n - k <= 3, Min[Tmin[n, k], Tmin2[n, k], T[k, n - k] + 1], T[k, n - k] + 1];
T[n_, k_ /; k > 1] /; n < k := T[n, k] = T[k, n];
Table[T[n - k + 1, k], {n, 1, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 11 2016, checked against first 496 terms of the b-file *)
A054856
Number of ways to tile a 4 X n region with 1 X 1, 2 X 2, 3 X 3 and 4 X 4 tiles.
Original entry on oeis.org
1, 1, 5, 13, 40, 117, 348, 1029, 3049, 9028, 26738, 79183, 234502, 694476, 2056692, 6090891, 18038173, 53420041, 158203433, 468519406, 1387520047, 4109140098, 12169216863, 36039131181, 106729873498, 316080480394, 936072224321
Offset: 0
Silvia Heubach (silvi(AT)cine.net), Apr 21 2000
a(2)=5 as there is one tiling of a 4 X 2 region with only 1 X 1 tiles, 3 tilings with exactly one 2 X 2 tile and 1 tiling with exactly two 2 X 2 tiles.
-
a[0]:=1: a[1]:=1: a[2]:=5: a[3]:=13: a[4]:=40: for n from 5 to 26 do a[n]:=2*a[n-1]+3*a[n-2]-a[n-4]-a[n-5] od: seq(a[n],n=0..26); # Emeric Deutsch, Oct 16 2006
-
f[ A_ ] := Module[ {til = A, sum}, sum = 2* Apply[ Plus, Drop[ til, -4 ] ]; AppendTo[ til, A[ [ -1 ] ] + 4A[ [ -2 ] ] + 4A[ [ -3 ] ] + 3A[ [ -4 ] ] + sum ] ]; NumOfTilings[ n_ ] := Nest[ f, {1, 1, 5, 13}, n - 2 ]; NumOfTilings[ 30 ]
A227690
Number A(n,k) of tilings of a k X n rectangle using integer-sided square tiles reduced for symmetry; square array A(n,k), n >= 0, k >= 0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 4, 3, 4, 1, 1, 1, 1, 5, 6, 6, 5, 1, 1, 1, 1, 9, 10, 13, 10, 9, 1, 1, 1, 1, 12, 21, 39, 39, 21, 12, 1, 1, 1, 1, 21, 39, 115, 77, 115, 39, 21, 1, 1, 1, 1, 30, 82, 295, 521, 521, 295, 82, 30, 1, 1
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 2, 2, 4, 5, 9, 12, 21, ...
1, 1, 2, 3, 6, 10, 21, 39, 82, ...
1, 1, 4, 6, 13, 39, 115, 295, 861, ...
1, 1, 5, 10, 39, 77, 521, 1985, 8038, ...
1, 1, 9, 21, 115, 521, 1494, 15129, 83609, ...
1, 1, 12, 39, 295, 1985, 15129, 56978, 861159, ...
1, 1, 21, 82, 861, 8038, 83609, 861159, 4495023, ...
...
A(4,3) = 6 because there are 6 ways to tile a 3 X 4 rectangle by subsquares, reduced for symmetry, i.e., where rotations and reflections are not counted as distinct:
._____ _. ._______. ._______.
| |_| | | | | |_|_|
| |_| |___|_ _| |___| |
|_____|_| |_|_|_|_| |_|_|___|
._______. ._______. ._______.
| |_|_| |_| |_| |_|_|_|_|
|___|_|_| |_|___|_| |_|_|_|_|
|_|_|_|_| |_|_|_|_| |_|_|_|_|
A054857
Number of ways to tile a 5 X n region with square tiles of size up to 5 X 5.
Original entry on oeis.org
1, 1, 8, 28, 117, 472, 1916, 7765, 31497, 127707, 517881, 2100025, 8515772, 34532063, 140030059, 567832091, 2302600696, 9337214060, 37863085664, 153537580071, 622606110920, 2524713292359, 10237896957896, 41515420557135
Offset: 0
Silvia Heubach (silvi(AT)cine.net), Apr 21 2000
a(2) = 8 as there is 1 tiling of a 5 X 2 region with only 1 X 1 tiles, 4 tilings with exactly one 2 X 2 tile and 3 tilings with exactly two 2 X 2 tiles.
-
f[ {A_, B_} ] := Module[ {til = A, basic = B}, {Flatten[ Append[ til, ListConvolve[ A, B ] ] ], AppendTo[ basic, B[ [ -1 ] ] + B[ [ -2 ] ] + B[ [ -3 ] ] ]} ]; NumOfTilings[ n_ ] := Nest[ f, {{1, 1, 8, 28, 117, 472, 1916, 7765}, {1, 7, 13, 20, 35, 66, 118, 218}}, n - 2 ][ [ 1 ] ] NumOfTilings[ 30 ]
A226545
Number A(n,k) of squares in all tilings of a k X n rectangle using integer-sided square tiles; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 5, 3, 0, 0, 4, 12, 12, 4, 0, 0, 5, 25, 34, 25, 5, 0, 0, 6, 50, 98, 98, 50, 6, 0, 0, 7, 96, 256, 386, 256, 96, 7, 0, 0, 8, 180, 654, 1402, 1402, 654, 180, 8, 0, 0, 9, 331, 1625, 4938, 6940, 4938, 1625, 331, 9, 0
Offset: 0
A(3,3) = 1 + 6 + 6 + 6 + 6 + 9 = 34:
._____. ._____. ._____. ._____. ._____. ._____.
| | | |_| |_| | |_|_|_| |_|_|_| |_|_|_|
| | |___|_| |_|___| |_| | | |_| |_|_|_|
|_____| |_|_|_| |_|_|_| |_|___| |___|_| |_|_|_|
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 2, 3, 4, 5, 6, 7, ...
0, 2, 5, 12, 25, 50, 96, 180, ...
0, 3, 12, 34, 98, 256, 654, 1625, ...
0, 4, 25, 98, 386, 1402, 4938, 16936, ...
0, 5, 50, 256, 1402, 6940, 33502, 157279, ...
0, 6, 96, 654, 4938, 33502, 221672, 1426734, ...
0, 7, 180, 1625, 16936, 157279, 1426734, 12582472, ...
Columns (or rows) k=0-10 give:
A000004,
A001477,
A067331(n-1) for n>0,
A226546,
A226547,
A226548,
A226549,
A226550,
A226551,
A226552,
A226553.
-
b:= proc(n, l) option remember; local i, k, s, t;
if max(l[])>n then [0,0] elif n=0 or l=[] then [1,0]
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; s:=[0$2];
for i from k to nops(l) while l[i]=0 do s:=s+(h->h+[0, h[1]])
(b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)]))
od; s
fi
end:
A:= (n, k)-> `if`(n>=k, b(n, [0$k]), b(k, [0$n]))[2]:
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[Max[l] > n, {0, 0}, n == 0 || l == {}, {1, 0}, Min[l] > 0, t=Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; s={0, 0}; For[i=k, i <= Length[l] && l[[i]] == 0, i++, s = s + Function[h, h+{0, h[[1]]}][b[n, Join[l[[1 ;; k-1]], Table[1+i-k, {j, k, i}], l[[i+1 ;; -1]]]]] ]; s]]; a[n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]][[2]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)
A219925
Number of tilings of a 6 X n rectangle using integer-sided square tiles.
Original entry on oeis.org
1, 1, 13, 60, 348, 1916, 10668, 59257, 329350, 1830234, 10171315, 56525022, 314128014, 1745708992, 9701463927, 53914132251, 299618062228, 1665073290365, 9253344266757, 51423790446062, 285778433090830, 1588162056821687, 8825923956549044, 49048479247236561
Offset: 0
a(2) = 13, because there are 13 tilings of a 6 X 2 rectangle using integer-sided square tiles:
._._. .___. ._._. ._._. ._._. ._._.
|_|_| | | |_|_| |_|_| |_|_| |_|_|
|_|_| |___| | | |_|_| |_|_| |_|_|
|_|_| |_|_| |___| | | |_|_| |_|_|
|_|_| |_|_| |_|_| |___| | | |_|_|
|_|_| |_|_| |_|_| |_|_| |___| | |
|_|_| |_|_| |_|_| |_|_| |_|_| |___|
.___. .___. .___. ._._. ._._. ._._. .___.
| | | | | | |_|_| |_|_| |_|_| | |
|___| |___| |___| | | | | |_|_| |___|
| | |_|_| |_|_| |___| |___| | | | |
|___| | | |_|_| | | |_|_| |___| |___|
|_|_| |___| | | |___| | | | | | |
|_|_| |_|_| |___| |_|_| |___| |___| |___|
-
gf:= -(2*x^9 +3*x^8 +2*x^7 -3*x^6 -7*x^5 -4*x^4 -3*x^3 +5*x^2 +2*x -1) / (2*x^15 +7*x^14 +12*x^13 +6*x^12 -18*x^11 -13*x^10 -8*x^9 -27*x^8 -32*x^7 +x^6 +40*x^5 +34*x^4 -3*x^3 -15*x^2 -3*x +1):
a:= n-> coeff (series (gf, x, n+1), x, n):
seq (a(n), n=0..40);
A219926
Number of tilings of a 7 X n rectangle using integer-sided square tiles.
Original entry on oeis.org
1, 1, 21, 129, 1029, 7765, 59257, 450924, 3435392, 26160354, 199243634, 1517411733, 11556549312, 88013947545, 670309228276, 5105035683160, 38879655193542, 296105186372225, 2255119850966932, 17174861374796123, 130802743517191075, 996186073044886758
Offset: 0
a(2) = 21, because there are 21 tilings of a 7 X 2 rectangle using integer-sided square tiles:
._._. .___. ._._. ._._. ._._. ._._. ._._. .___. .___. .___. .___.
|_|_| | | |_|_| |_|_| |_|_| |_|_| |_|_| | | | | | | | |
|_|_| |___| | | |_|_| |_|_| |_|_| |_|_| |___| |___| |___| |___|
|_|_| |_|_| |___| | | |_|_| |_|_| |_|_| | | |_|_| |_|_| |_|_|
|_|_| |_|_| |_|_| |___| | | |_|_| |_|_| |___| | | |_|_| |_|_|
|_|_| |_|_| |_|_| |_|_| |___| | | |_|_| |_|_| |___| | | |_|_|
|_|_| |_|_| |_|_| |_|_| |_|_| |___| | | |_|_| |_|_| |___| | |
|_|_| |_|_| |_|_| |_|_| |_|_| |_|_| |___| |_|_| |_|_| |_|_| |___|
._._. ._._. ._._. ._._. ._._. ._._. .___. .___. .___. ._._.
|_|_| |_|_| |_|_| |_|_| |_|_| |_|_| | | | | | | |_|_|
| | | | | | |_|_| |_|_| |_|_| |___| |___| |___| | |
|___| |___| |___| | | | | |_|_| | | | | |_|_| |___|
| | |_|_| |_|_| |___| |___| | | |___| |___| | | | |
|___| | | |_|_| | | |_|_| |___| | | |_|_| |___| |___|
|_|_| |___| | | |___| | | | | |___| | | | | | |
|_|_| |_|_| |___| |_|_| |___| |___| |_|_| |___| |___| |___|
-
gf:= -(6*x^18 -x^17 -9*x^16 +13*x^15 +20*x^14 -35*x^13 -47*x^12 -76*x^11 -145*x^10 -127*x^9 -8*x^8 +64*x^7 +96*x^6 +68*x^5 +7*x^4 -10*x^3 -13*x^2 -2*x +1) / (6*x^25 +11*x^24 -9*x^23 -10*x^22 +39*x^21 +12*x^20 -70*x^19 -281*x^18 -403*x^17 -110*x^16 -118*x^15 -790*x^14 -179*x^13 +466*x^12 +327*x^11 +669*x^10 +1028*x^9 +231*x^8 -45*x^7 -284*x^6 -273*x^5 -61*x^4 +45*x^3 +31*x^2 +3*x -1):
a:= n-> coeff(series(gf, x, n+1), x, n):
seq(a(n), n=0..30);
A219927
Number of tilings of an 8 X n rectangle using integer-sided square tiles.
Original entry on oeis.org
1, 1, 34, 277, 3049, 31497, 329350, 3435392, 35863972, 374285478, 3906605183, 40773605243, 425562898029, 4441677458152, 46358636450427, 483853831650209, 5050074056261222, 52708577944998395, 550129399697072615, 5741804607960538038, 59928300863912394900
Offset: 0
-
gf:= -(60*x^40 +136*x^39 -321*x^38 -1038*x^37 -2045*x^36 +2501*x^35 +4393*x^34 +7347*x^33 +4372*x^32 -4825*x^31 -13838*x^30 -19585*x^29 -9331*x^28 -40213*x^27 +19891*x^26 +57417*x^25 +68058*x^24 +10427*x^23 -8789*x^22 +6040*x^21 -76684*x^20 -81024*x^19 -16484*x^18 +11908*x^17 +42083*x^16 +63711*x^15 +19938*x^14 -2290*x^13 -18240*x^12 -18560*x^11 -7633*x^10 +291*x^9 +4194*x^8 +2502*x^7 +378*x^6 -361*x^5 -240*x^4 -33*x^3 +27*x^2 +5*x -1) /
(60*x^48 +256*x^47 +35*x^46 -1488*x^45 -4435*x^44 -2543*x^43 +7032*x^42 +16610*x^41 +23043*x^40 +18924*x^39 +3186*x^38 -57091*x^37 -115830*x^36 -141242*x^35 +18849*x^34 +39846*x^33 +240064*x^32 +433164*x^31 +162501*x^30 -692061*x^29 -641988*x^28 +446013*x^27 +530385*x^26 +657974*x^25 -654746*x^24 -708014*x^23 -43614*x^22 -370550*x^21 +356235*x^20 +824516*x^19 +224413*x^18 -94736*x^17 -143852*x^16 -344353*x^15 -110166*x^14 +15107*x^13 +55317*x^12 +51581*x^11 +29259*x^10 +6818*x^9 -5977*x^8 -8807*x^7 -2453*x^6 +1175*x^5 +708*x^4 +15*x^3 -55*x^2 -6*x +1):
a:= n-> coeff(series(gf, x, n+1), x, n):
seq(a(n), n=0..30);
Showing 1-10 of 25 results.
Comments