From The Sunday Times, 18th April 1982 [link]
The Manager of a large company greeted his twelve new computer staff. “You have been given consecutive, five-digit, Staff Reference Numbers (SRN). I remember numbers by finding their prime factors, using mental arithmetic — pre-computer vintage. Why not try it? If you would each tell me what factors you have, without specifying them (and ignoring unity), I should be able to work out your SR numbers”.
John said: “My number is prime.”
Ted said ” I have two prime factors. Your number follows mine doesn’t it, Les?”
Ian said: “I also have two, one of which squared. Alan’s just before me on the list.”
Sam said: “One of mine is to the power four. The last two digits of my SRN give me the other prime factor.”
Pete said: “I’ve got one factor to the power four as well. The other one is my year of birth.”
Brian said: “My number has one prime factor cubed and two others, both squared.”
Chris said: “I’m the only one with four factors, one of which is squared. Fred’s number is one less than mine.”
Dave started to say: “Kevin’s SRN is the one after mine, which …” when the Manager interrupted. “I can now list all twelve!”
List the twelve people, by initials, in increasing order of SRNs. What is Sam’s SRN?
This was the final puzzle to go by the title “Brain teaser“. The next puzzle was “Brainteaser 1030“.
This puzzle is included in the book The Sunday Times Book of Brainteasers (1994).
[teaser1029]
Jim Randell 10:46 am on 15 August 2025 Permalink |
To make a rectangle into a pentagon with a single cut, we cut one of the corners off, which means we discard a right-angled triangle. And all sides of the pentagon have integer lengths, which means so do the sides of the triangle, so its sides are a Pythagorean triple.
This Python program runs in 60ms. (Internal runtime is 91µs).
from enigma import (irange, cproduct, pythagorean_triples, ordered, printf) # the hypotenuse of the removed triangle cannot be more than 33 for (x, y, z) in pythagorean_triples(33): if z < 17: continue # or less than 17 # consider possible rectangles (a, b) for (a, b) in cproduct([irange(x + 17, 33), irange(y + 17, 33)]): # the sides of the pentagon P = ordered(a, b, a - x, b - y, z) if not (P[0] == 17 and P[1] == 19 and P[-1] == 33): continue # output solution printf("rectangle={R} triangle={T} -> pentagon={P}", R=(a, b), T=(x, y, z))Solution: The remaining sides of the pentagon have lengths of 20 cm and 31 cm.
The scenario is this:
LikeLike
Frits 2:54 pm on 15 August 2025 Permalink |
from enigma import pythagorean_triples m1, m2, M = 17, 19, 33 # the hypotenuse of the removed triangle cannot be more than M for (x, y, z) in pythagorean_triples(33): if z < m1: continue # consider possible rectangles (w, h) for w in range(m1 + x, M + 1): lo, mi, hi = sorted([w, w - x, z]) if mi < m2: continue if {m1, m2, M}.isdisjoint({lo, mi, hi}): continue if hi != M: h_rng = [M] elif lo != m1: h_rng = [m1 + y] if m1 + y <= M else [] else: h_rng = range(m1 + y, M + 1) for h in h_rng: # five sides of the pentagon s1, s2, s3, s4, s5 = sorted([lo, mi, hi, h, h - y]) if not (s1 == m1 and s2 == m2 and s5 == M): continue print("answer:", [s3, s4])LikeLike