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 8:11 am on 29 July 2025 Permalink |
(See also: Enigma 799).
Suppose J takes 1 unit of time to swim a length, and P takes p units of time to swim a length.
And after J has completed 48 lengths, P has completed n = 48/p lengths, which is a whole number.
For them to pass on their first and then second lengths we have:
Hence:
For a given n value, we can calculate the crossing positions using a time/distance graph:
And then look for values where the distance between the positions divides exactly into the pool length.
This Python program runs in 74ms. (Internal runtime is 4.6ms).
from enigma import (irange, rdiv, line_intersect, catch, printf) # positions for J after lengths 0, 1, 2; P after length 0 (J0, J1, J2, P0) = ((0, 1), (1, 0), (2, 1), (0, 0)) # consider number of lengths completed by P at t=48 for n in irange(25, 95): p = rdiv(48, n) # positions for P after lengths 1, 2 (P1, P2) = ((p, 1), (2*p, 0)) # calculate crossing position during first two lengths i1 = catch(line_intersect, J0, J1, P0, P1, internal=1, div=rdiv) i2 = catch(line_intersect, J1, J2, P1, P2, internal=1, div=rdiv) if i1 is None or i2 is None: continue ((t1, d1), (t2, d2)) = (i1.pt, i2.pt) # pool length is an exact multiple of the distance between the positions if d1 == d2: continue k = rdiv(1, abs(d1 - d2)) if k % 1 != 0: continue # output solution printf("n={n} [p={p} k={k}]")Solution: Pat had completed 80 lengths.
So Pat completes a length in 48/80 = 3/5 the time it takes John. And the distance between the crossing positions is exactly 1/2 the length of the pool.
We have:
LikeLike
Frits 2:27 pm on 30 July 2025 Permalink |
# L = length of the pool # 1st passing # 0 j1*L p1*L L j1 + p1 = 1 # |---------------+---------------------------| # speed ratio r1 = p1 / j1 # 2nd passing # 0 L # |-------------------------------------------| # j2*L p2*L j2 + p2 = 1 # |------------------------------------+------| # speed ratio Pat / John # r = n / 48 # j1 = 1 / (r + 1) # 2nd passing: distance that P swam = r * (distance that J swam) # L + j2.L = r.(L + p2.L) or 1 + j2 = r.(2 - j2) or j2 = (2.r - 1) / (r + 1) # j2 = (2 * r - 1) / (r + 1) # 24 < n < 96 # n must be a multiple of 4 as denominator in formula below is a multiple of 4 for n in range(28, 96, 4): # distance between those first two passing points > 0 if n == 48: continue # L = multiple of the distance passing points = m * (abs(j1 - j2) * L) # if (r + 1) % (2 * r - 2): continue if (n + 48) % (2 * n - 96): continue print("answer:", n)LikeLike
Frits 3:05 pm on 30 July 2025 Permalink |
“n” can even be proven to be a multiple of 16.
LikeLike