Sunday Times Teaser 3315 – Primal Scream
by Andrew Gibbons
Published Sunday April 05 2026 (link)
A fox’s scream woke me in the night. I noted the time on my alarm clock display (hours and minutes) and realised that this number was the product of two prime numbers. For example, at 01:43, the number 143 is 11×13. One minute later the numerical time was also the product of two prime numbers. Interestingly, one of the prime numbers at the later time was less than one of the numbers at the earlier time, but these two numbers had the same final two digits in the same order.
At what time did the fox wake me?
2 Comments
Leave one →
-
Frits permalink12345678910111213141516171819202122232425262728293031323334353637383940# list of prime numbers up to 48P = [3, 5, 7]P = [2] + P + [x for x in range(11, int(2359**.5) + 1, 2)if all(x % p for p in P)]# list of prime numbers up to 34P2 = [p for p in P if p <= int((2359 / 2) **.5)]d = dict()# consider night hours to be between 9pm and 9amfor h in list(range(21, 24)) + list(range(9)):for m in range(60):tm = 100 * h + m# check is tm the product of 2 prime numbersfor p1 in P:p2, r = divmod(tm, p1)if r: continueif p2 == 1 or tm == 0: break # tm is prime or zero# check primes up to sqrt(2359 / 2)if all(p2 % p for p in P2):d[tm] = (p1, p2)break# assumption: "one" means "exactly one"for k, (p1a, p1b) in d.items():if p1b < 10: continue# only keep candidate times where next minute is also a candidatenxt = k + 1 if k % 100 < 59 else 100 * (((k + 41) // 100) % 24)if nxt not in d: continue(p2a, p2b) = d[nxt]if p2a < p1a: continue # otherwise p2a would be less than p1a and p1bl2 = p1b % 100# collect primes smaller than p1b with same last 2 digitsif len([p2 for p2 in (p2a, p2b) if p2 % 100 == l2]) != 1:continueprint(f"answer: {k // 100:02}:{k % 100}")