Teaser 1995: Pyramid selling
From The Sunday Times, 10th December 2000 [link]
At the fruit stall in our local market the trader built a stack of oranges using the contents of some complete boxes, each containing the same number of oranges.
He first laid out one box of oranges in a rectangle to form the base of a stack. He then added more oranges layer by layer from the contents of the other boxes. Each layer was a rectangle one orange shorter and narrower than the layer beneath it.
The top layer should have consisted of a single row of oranges but the trader was one orange short of being able to complete the stack.
How many oranges were there in each box?
This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.
This completes the 72 puzzles from the Brainteasers (2002) book.
In the New Year I will start posting puzzles from the 1980 book The Sunday Times book of Brain Teasers: Book1 (50 hard (very hard) master problems), compiled by Victor Bryant and Ronald Postill. It is a selection of Teaser puzzles originally published in The Sunday Times between January 1974 and December 1979.
Happy New Year from S2T2!
[teaser1995]



















Jim Randell 8:38 am on 31 December 2020 Permalink |
See: Enigma 1086.
This Python program runs in 43ms.
Run: [ @repl.it ]
from enigma import (irange, inf, div, printf) # calculate stacking numbers n <= m stack = lambda n, m: sum((n - i) * (m - i) for i in irange(n)) # or: n * (n + 1) * (3 * m - n + 1) // 6 # generate (n, m) pairs where 1 < n < m def pairs(): for t in irange(5, inf): for n in irange(2, (t - 1) // 2): yield (n, t - n) # consider n, m values for (n, m) in pairs(): # number of oranges in a box b = n * m # number of stacked oranges s = stack(n, m) - 1 # number of boxes required k = div(s, b) if k is not None: printf("n={n} m={m} b={b} s={s} k={k}") breakSolution: There were 72 oranges in each box.
3 boxes were used, making a total of 216 oranges.
The base layer was 6 × 12 layer, using 72 oranges (= 1 box).
The remaining layers:
use 55+40+27+16+6 = 144 oranges (= 2 boxes)
Manually:
To complete a structure starting with a base that is n × m where n ≤ m, the number of oranges required is:
And if we use k boxes we have:
n divides the LHS, so n must divide the RHS, hence n divides 6.
So: n = 1, 2, 3, 6.
If n = 6:
so: m = 12, k = 3.
If n = 3:
doesn’t work.
If n = 2:
doesn’t work.
If n = 1:
doesn’t work.
So: n = 6, m = 12, k = 3 is the only viable solution.
LikeLike