Sunday Times Teaser 2513 – No Title
by H Bradley and C Higgins
Published November 21 2010 (link)
At the golf ball factory 10,000 balls are stored in a stack for some weeks to harden. The stack has several layers, the top layer being a single row of balls. The second layer has two rows, each with one ball more than the top row. The third layer has three rows each with two balls more than the top row, and so on.
Of the several shapes of stack possible, the one used takes up the smallest floor area.
How many balls are on the bottom layer?
One Comment
Leave one →
-
Brian Gladman permalink12345678910111213141516171819202122232425# Balls in layers:## 1: 1.(n - 1 + 1)# 2: 2.(n - 1 + 2)# 3: 3.(n - 1 + 3)# ...# m: m.(n - 1 + m)## Total Balls in the stack (N) and the bottom layer (B):## N = m.(m + 1).(n - 1) / 2 + 1^2 + 2^2 + .. + m^2# = m.(m + 1).{2.m + 3.n - 2) / 6## B = m.(m + n - 1)print(f' m n base')N = 10000for m in range(1, 31):q, r = divmod(6 * N, m * (m + 1))if not r:n, r = divmod(q - 2 * m + 2, 3)if not r:print(f'{m:>2} {n:>6} {m * (n + m - 1):>6}')