Teaser 3039: Three patterned paving
From The Sunday Times, 20th December 2020 [link]
James is laying foot-square stones in a rectangular block whose short side is less than 25 feet. He divides this area into three rectangles by drawing two parallel lines between the longest sides and into each of these three areas he lays a similar pattern.
The pattern consists of a band or bands of red stones laid concentrically around the outside of the rectangles with the centre filled with white stones. The number of red stone bands is different in each of the rectangles but in each of them the number of white stones used equals the number of outer red stones used.
The total number of stones required for each colour is a triangular number (i.e., one of the form 1+2+3+…).
What is the total area in square feet of the block?
[teaser3039]
Jim Randell 5:51 pm on 18 December 2020 Permalink |
(See also: Teaser 3007).
After some head scratching I realised that the parallel lines are parallel to the short sides of the rectangular block, not the long sides.
Considering a section of paving that is n stones wide and h stones long.
If we count the number of border layers on both sides of the central area, we get an even number b, such that b < n.
And if the border area is the same as the central area we have:
So for any (n, b) pair we can calculate a value for h, and accept values where b < h.
The following Python program runs in 44ms.
Run: [ @replit ]
Solution: The total area of the block is 2352 square feet.
The block is 24 feet wide and 98 feet long, and is split into three sections:
24 feet × 10 feet, border 2 deep. (120 slabs of each colour).
24 feet × 18 feet, border 3 deep. (216 slabs of each colour).
24 feet × 70 feet, border 5 deep. (840 slabs of each colour).
In total 1176 slabs of each colour are required, and 1176 = T(48).
Here’s a diagram of the three sections, with the longest one in the middle:
LikeLike
Frits 6:37 pm on 19 December 2020 Permalink |
I tried pythagorean_triples in combination with SubstitutedExpression (as n^2 + h^2 must be square) but that was too slow.
LikeLike