Sunday Times Teaser 2992 – Crystal Cleavage Calamity!
by Stephen Hogg
Published January 26 2020 (link)
My “mystic” crystal stood on its triangular end face, with every side of the triangle being less than 10cm. It had three vertical sides and an identical triangular top end face, with the height being under 50cm. Unfortunately, during dusting, it fell and broke in two. The break was a perfect cleavage along an oblique plane that didn’t encroach on the end faces, so I then had two, pointed, pentahedral crystals.
Later, I found that the nine edge lengths, in cm, of one of these were all different whole numbers — the majority prime — and their total was also a prime number. Curiously, the total of the nine, wholenumber, edge lengths, in cm, of the other piece was also a prime number.
What was the total for this latter piece?

GeoffR permalink1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556from number_theory import is_prime# return the square root of a perfect square otherwise 50# (to signal failure)def is_psqr(x):return r if (r := int(x ** 0.5 + 0.5)) ** 2 == x else 50# choose base triangle numbers (a, b, c)for a in range(1, 10):for b in range(a + 1, 10):# ensure a valid base trianglefor c in range(1, a + b):# the height of the first vertical edgefor x in range(1, 50):# the cleavage plane edges corresponding to (a, b, c)# are (d, e, f)for d in range(a + 1, 50):# use the lengths of edges a and d to calculate the# height difference between x and y and hence yy = x + is_psqr(d * d  a * a)if y > 50:continuefor e in range(max(d, b) + 1, 50):# use the lengths of edges b and e to calculate the# height difference between y and z and hence zz = y + is_psqr(e * e  b * b)if z > 50:continue# calculate the remaining cleavage edge from the base# edge c and the height difference between z and xf = is_psqr(c * c + (z  x) ** 2)if f >= 50:continue# the edge lengths are all different, their sum is prime# and the majority of them are primeedges = (a, b, c, d, e, f, x, y, z)if not ( len(set(edges)) == 9 and is_prime(sum(edges))and sum(is_prime(x) for x in edges) > 4):continue# now consider the other prismfor ht in range(z + 1, 50):t = sum(edges[:6]) + 3 * ht  sum(edges[6:])if is_prime(t):print(f"Base triangle sides: {a},{b},{c}")print(f"Heights to fracture plane: {x},{y},{z}")print(f"Sides of fracture plane: {d},{e},{f}")print(f"Edge total length of 2nd piece: {t}")print()