Sunday Times Teaser 3123 – A Six-Pipe Problem
by Nick MacKinnon
Published Sunday July 31 2022 (link)
A factory makes six types of cylindrical pipe, A to F in decreasing size, whose diameters in centimetres are whole numbers, with type A 50 per cent wider than type B. The pipes are stacked in the yard as a touching row of As with an alternating row of touching Bs and Cs in the next layer, with each B touching two As. Type Ds fill the gap between the As and the ground; Es fill the gap between As and the Bs; and Fs fill the gap between As, Ds and the ground. Finally another row of As is put on top of the stack, giving a height of less than 5 metres.
What is the final height of the stack in centimetres?
One Comment
Leave one →
-
Brian Gladman permalink12345678910111213141516171819202122232425262728293031323334353637383940from math import isqrt# Soddy Circles: https://mathworld.wolfram.com/SoddyCircles.html## circles radius p, q, r, tangent circle s:## s = p.q.r / [p.q + q.r + r.p + 2.sqrt((p + q + r).p.q.r)]def soddy(p, q, r):if r:n = p * q * rx = n * (p + q + r)d = p * q + q * r + r * pelse:# degenerate case when r -> infinity (input r = 0)n = x = p * qd = p + qz = isqrt(x)if z * z == x:s, t = divmod(n, d + 2 * z)if not t:return sraise ValueError# the radius increment with 14 * r < 500for r in range(1, 499 // 14 + 1):# the diameters of circles A, B and C and heighta, b, c, h = 6 * r, 4 * r, 2 * r, 14 * rtry:d = soddy(a, a, 0)e = soddy(a, a, b)f = soddy(a, d, 0)except ValueError:continuet = (a, b, c, d, e, f)print(f"Height {14 * r} cm; circle diameters (cm): {t}")