# Tiling a square with rectangles whose areas or perimeters are 1, 2, 3, ..., N

For which positive integers N does there exist a square that can be completely tiled with N rectangles of integer sides whose areas or perimeters are precisely 1, 2, 3, ..., N?

• This question seem ambiguous; do you mean tiled by rectangles $R_1, R_2, ..., R_N$ such that for each $i$, either $P(R_i) = i$ or $A(R_i) = i$? In other words, does the choice of "area or perimeter" for one rectangle constrain the choice for other rectangles? Also, do you require that the rectangles have integer side lengths? Mar 5, 2019 at 1:13
• @user44191: yes. Mar 5, 2019 at 1:15
• Please expand the question, because your question, the questions in a comment and your answer in another comment are equally confusing, at least for me. If you are asking two questions, one about perimeters and another about areas, it is better to separate them. Just ask about areas, then add - the same question with areas replaced by perimeters. Mar 5, 2019 at 8:42
• You came back to edit, Bernardo, but you failed to edit in any clarification on the rectangles having integer sides. Mar 5, 2019 at 11:55
• @GerryMyerson: Done. Mar 5, 2019 at 12:00

Here are solutions for $$N=10$$ in a square of side $$7$$:

Here is a solution for $$N=52$$ in a square of side $$47$$:

At user44191's suggestion, here is the list of areas and perimeters of the rectangles used in $$N=52$$:

$$\small \begin{array}{rlrlrl} n & \textrm{Area or Perimeter} & n & \textrm{Area or Perimeter} & n & \textrm{Area or Perimeter}\\ 1 & 1\times 1 & 19 & 19\times 1 & 37 & 37\times 1 \\ 2 & 2\times 1 & 20 & 5+5+5+5 & 38 & 10+10+9+9 \\ 3 & 3\times 1 & 21 & 7\times 3 & 39 & 13\times 3 \\ 4 & 1+1+1+1 & 22 & 6+6+5+5 & 40 & 10+10+10+10\\ 5 & 5\times 1 & 23 & 23\times 1 & 41 & 41\times 1 \\ 6 & 2+2+1+1 & 24 & 6+6+6+6 & 42 & 11+11+10+10\\ 7 & 7\times 1 & 25 & 5\times 5 & 43 & 43\times 1 \\ 8 & 3+3+1+1 & 26 & 7+7+6+6 & 44 & 11+11+11+11\\ 9 & 3\times 3 & 27 & 9\times 3 & 45 & 9\times 5 \\ 10 & 4+4+1+1 & 28 & 7+7+7+7 & 46 & 12+12+11+11\\ 11 & 11\times 1 & 29 & 29\times 1 & 47 & 47\times 1 \\ 12 & 5+5+1+1 & 30 & 8+8+7+7 & 48 & 12+12+12+12\\ 13 & 13\times 1 & 31 & 31\times 1 & 49 & 7\times 7 \\ 14 & 6+6+1+1 & 32 & 8+8+8+8 & 50 & 13+13+12+12\\ 15 & 15\times 1 & 33 & 11\times 3 & 51 & 17\times 3 \\ 16 & 5+5+3+3 & 34 & 9+9+8+8 & 52 & 13+13+13+13\\ 17 & 17\times 1 & 35 & 7\times 5 \\ 18 & 18\times 1 & 36 & 9+9+9+9 \\ \end{array}$$

• Wow. I didn't think there would be an example this small. Gerhard "Much Less Four Of Them" Paseman, 2019.03.06. Mar 6, 2019 at 22:37
• Really amazing! Mar 7, 2019 at 1:08
• Yes, @მამუკაჯიბლაძე, there is at least one solution for $N=52$. Mar 9, 2019 at 2:38
• @JosephO'Rourke It is OK, one is counted for area and another for perimeter! Mar 9, 2019 at 3:47
• @user44191 Done. Mar 17, 2019 at 1:31

Here's a nice solution. N=71 into a square of 71. There is no "spare area", every rectangle is the maximum area. That means all even rectangles from 18 up use the most convex perimeter and below 18 no perimeters are used. This is the only N for which this is true except for the degenerate case of N=1.

There is still some latitude in that any non-prime odd rectangles, and even rectangles less than 18 have more than one shape available.

List of rectangles used. 'A' means area, 'P' means perimeter. Rectangle dimensions x*y are shown. To get perimeter from x,y use 2(x+y).

A 1  1x 1
A 2  1x 2
A 3  1x 3
A 4  1x 4
A 5  1x 5
A 6  2x 3
A 7  1x 7
A 8  2x 4
A 9  3x 3
A10  1x10
A11  1x11
A12  1x12
A13  1x13
A14  1x14
A15  1x15
A16  4x 4
A17  1x17
P18  4x 5
A19  1x19
P20  5x 5
A21  3x 7
P22  5x 6
A23  1x23
P24  6x 6
A25  5x 5
P26  6x 7
A27  3x 9
P28  7x 7
A29  1x29
P30  7x 8
A31  1x31
P32  8x 8
A33  1x33
P34  8x 9
A35  5x 7
P36  9x 9
A37  1x37
P38  9x10
A39  3x13
P40 10x10
A41  1x41
P42 10x11
A43  1x43
P44 11x11
A45  5x 9
P46 11x12
A47  1x47
P48 12x12
A49  7x 7
P50 12x13
A51  3x17
P52 13x13
A53  1x53
P54 13x14
A55  5x11
P56 14x14
A57  3x19
P58 14x15
A59  1x59
P60 15x15
A61  1x61
P62 15x16
A63  7x 9
P64 16x16
A65  5x13
P66 16x17
A67  1x67
P68 17x17
A69  3x23
P70 17x18
A71  1x71


List of areas for N up to 125.

1. N
2. Sum of 1 to N, ie what you get if all rectangles are of area N
3. Largest prime less than N, ie minimum size of square
4. How much extra area you get by using the largest area perimeters for each even N of 18 and higher
5. Sum of all 'extra' areas from 18 to N
6. Area of minimum square
7. Column 1 (base area) plus column 4 (extra area) minus area of minimum square. If this is zero or positive we could make a square.
1   1       1   0   0       1       0
2   3       2   0   0       4       -1
3   6       3   0   0       9       -3
4   10      3   0   0       9       1
5   15      5   0   0       25      -10
6   21      5   0   0       25      -4
7   28      7   0   0       49      -21
8   36      7   0   0       49      -13
9   45      7   0   0       49      -4
10  55      7   0   0       49      6
11  66      11  0   0       121     -55
12  78      11  0   0       121     -43
13  91      13  0   0       169     -78
14  105     13  0   0       169     -64
15  120     13  0   0       169     -49
16  136     13  0   0       169     -33
17  153     17  0   0       289     -136
18  171     17  2   2       289     -116
19  190     19  0   2       361     -169
20  210     19  5   7       361     -144
21  231     19  0   7       361     -123
22  253     19  8   15      361     -93
23  276     23  0   15      529     -238
24  300     23  12  27      529     -202
25  325     23  0   27      529     -177
26  351     23  16  43      529     -135
27  378     23  0   43      529     -108
28  406     23  21  64      529     -59
29  435     29  0   64      841     -342
30  465     29  26  90      841     -286
31  496     31  0   90      961     -375
32  528     31  32  122     961     -311
33  561     31  0   122     961     -278
34  595     31  38  160     961     -206
35  630     31  0   160     961     -171
36  666     31  45  205     961     -90
37  703     37  0   205     1369    -461
38  741     37  52  257     1369    -371
39  780     37  0   257     1369    -332
40  820     37  60  317     1369    -232
41  861     41  0   317     1681    -503
42  903     41  68  385     1681    -393
43  946     43  0   385     1849    -518
44  990     43  77  462     1849    -397
45  1035    43  0   462     1849    -352
46  1081    43  86  548     1849    -220
47  1128    47  0   548     2209    -533
48  1176    47  96  644     2209    -389
49  1225    47  0   644     2209    -340
50  1275    47  106 750     2209    -184
51  1326    47  0   750     2209    -133
52  1378    47  117 867     2209    36
53  1431    53  0   867     2809    -511
54  1485    53  128 995     2809    -329
55  1540    53  0   995     2809    -274
56  1596    53  140 1135    2809    -78
57  1653    53  0   1135    2809    -21
58  1711    53  152 1287    2809    189
59  1770    59  0   1287    3481    -424
60  1830    59  165 1452    3481    -199
61  1891    61  0   1452    3721    -378
62  1953    61  178 1630    3721    -138
63  2016    61  0   1630    3721    -75
64  2080    61  192 1822    3721    181
65  2145    61  0   1822    3721    246
66  2211    61  206 2028    3721    518
67  2278    67  0   2028    4489    -183
68  2346    67  221 2249    4489    106
69  2415    67  0   2249    4489    175
70  2485    67  236 2485    4489    481
71  2556    71  0   2485    5041    0
72  2628    71  252 2737    5041    324
73  2701    73  0   2737    5329    109
74  2775    73  268 3005    5329    451
75  2850    73  0   3005    5329    526
76  2926    73  285 3290    5329    887
77  3003    73  0   3290    5329    964
78  3081    73  302 3592    5329    1344
79  3160    79  0   3592    6241    511
80  3240    79  320 3912    6241    911
81  3321    79  0   3912    6241    992
82  3403    79  338 4250    6241    1412
83  3486    83  0   4250    6889    847
84  3570    83  357 4607    6889    1288
85  3655    83  0   4607    6889    1373
86  3741    83  376 4983    6889    1835
87  3828    83  0   4983    6889    1922
88  3916    83  396 5379    6889    2406
89  4005    89  0   5379    7921    1463
90  4095    89  416 5795    7921    1969
91  4186    91  0   5795    8281    1700
92  4278    91  437 6232    8281    2229
93  4371    91  0   6232    8281    2322
94  4465    91  458 6690    8281    2874
95  4560    91  0   6690    8281    2969
96  4656    91  480 7170    8281    3545
97  4753    97  0   7170    9409    2514
98  4851    97  502 7672    9409    3114
99  4950    97  0   7672    9409    3213
100 5050    97  525 8197    9409    3838
101 5151    101 0   8197    10201   3147
102 5253    101 548 8745    10201   3797
103 5356    103 0   8745    10609   3492
104 5460    103 572 9317    10609   4168
105 5565    103 0   9317    10609   4273
106 5671    103 596 9913    10609   4975
107 5778    107 0   9913    11449   4242
108 5886    107 621 10534   11449   4971
109 5995    109 0   10534   11881   4648
110 6105    109 646 11180   11881   5404
111 6216    109 0   11180   11881   5515
112 6328    109 672 11852   11881   6299
113 6441    113 0   11852   12769   5524
114 6555    113 698 12550   12769   6336
115 6670    113 0   12550   12769   6451
116 6786    113 725 13275   12769   7292
117 6903    113 0   13275   12769   7409
118 7021    113 752 14027   12769   8279
119 7140    119 0   14027   14161   7006
120 7260    119 780 14807   14161   7906
121 7381    119 0   14807   14161   8027
122 7503    119 808 15615   14161   8957
123 7626    119 0   15615   14161   9080
124 7750    119 837 16452   14161   10041
125 7875    119 0   16452   14161   10166

• Great contribution. This seems to support the claim that such tilings are possible for all sufficiently large N. Jun 30, 2019 at 20:55

I'll ignore the perimeters and just look at the question where the areas are meant to be $$1,2,\dots,N$$. Then the total area is $$N(N+1)/2$$, so the side of the square is less than $$(N+1)/\sqrt2$$. But for $$N$$ sufficiently large, it's guaranteed that there's a prime $$p$$ between $$(N+1)/\sqrt2$$ and $$N$$, so you have to use a rectangle of area $$p$$, and the only such rectangle with integer sides is the $$1\times p$$ rectangle, and that won't fit in the square (unless you tilt it, and it seems highly unlikely that there would be a way to tile a square with tilted rectangles).

• However, integer sides were not specified. I have eight rectangles of sides 6 by j/6 which tile a square of area 36. Gerhard "There Are Other Solutions Too" Paseman, 2019.03.04. Mar 5, 2019 at 6:09
• @Gerhard, in the comments on the question, user44191 asked, "do you require that the rectangles have integer side lengths?" and OP replied, "yes". Mar 5, 2019 at 6:15
• In which case you don't have to ignore perimeters, and your solution still applies. Gerhard "What To Do With Primes" Paseman, 2019.03.05. Mar 5, 2019 at 15:35
• @GerhardPaseman Why does it still apply? Gerry Myerson's solution only answered the question by calculating total area, which doesn't work in the more general case where some are perimeters instead of areas. Mar 5, 2019 at 20:06
• A puzzle based on this problem is now at: puzzling.stackexchange.com/questions/85475/…. Jun 26, 2019 at 1:57
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 15, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}