Teaser 3291: Top of the Pops
From The Sunday Times, 19th October 2025 [link] [link]
George and Martha are keen pop music fans. They recently followed the progress of one record in the charts and noticed that it was in the Top Ten for three weeks in three different positions, the third week’s position being the highest. In practice, a record never zigzags; it reaches a peak and then drops. For example: 5,4,9 or 5,6,9 are possible but 2,5,3 is not.
“That’s interesting!”, commented Martha. “If you add the three positions, you get the day of the month when my father was born; and if you multiply them, you get a number giving the month and last two digits of that year”. “Furthermore”, added George “two of the positions also indicate the last two digits of that year”.
What were the three positions in chronological order, and what was the date of Martha’s father’s birth?
[teaser3291]





Jim Randell 8:08 am on 19 October 2025 Permalink |
The position in the third week is the highest in the chart (i.e. the smallest number), and so the previous position must be lower (i.e. a larger number), and as the record does not “zig-zag” (i.e. go down the chart, and then back up the chart), the first position must be the lowest of the three (i.e. the largest number). So if the numbers are p1, p2, p3, we have:
This Python program runs in 72ms. (Internal runtime is 126µs).
from enigma import (irange, subsets, multiply, mdivmod, printf) # choose the three positions for ps in subsets(irange(10, 1, step=-1), size=3): # sum is D; product is MYY (d, (m, x, y)) = (sum(ps), mdivmod(multiply(ps), 10, 10)) if m < 1: continue # the 2 digits of the year are also (different) positions if not (x != y and x in ps and y in ps): continue # output solution printf("{ps} -> {d}/{m}/{x}{y}")Solution: The positions were: 9, 5, 3. Martha’s father’s birth date is: 17/1/35.
We have:
LikeLike
Frits 9:14 am on 19 October 2025 Permalink |
Two solutions.
from itertools import permutations from math import prod # disallow descending after ascending within sequence <s> def zigzag(s): asc = 0 for x, y in zip(s, s[1:]): if y > x: asc = 1 else: if asc: return True return False assert not zigzag([5, 4, 9]) assert not zigzag([5, 6, 9]) assert zigzag([2, 5, 3]) # a tenth position results in a year .0 for p in permutations(range(1, 10), 3): # the third week's position being the highest if max(p) != p[-1]: continue # a record never zigzags if zigzag(p): continue # multiplying gives the month and last two digits of that year if (m := prod(p)) < 100: continue yy = m % 100 if yy < 10 or yy % 10 == 0: continue # two of the positions also indicate the last two digits of that year if yy % 11 == 0: continue if any(x not in p for x in divmod(yy, 10)): continue print((f"three positions {p}, birthdate {sum(p)}/{m // 100}/{yy}"))LikeLike
Jim Randell 9:25 am on 19 October 2025 Permalink |
@Frits: In the charts a “higher” position is the lower numbered one. (So the “highest” position is number 1).
LikeLike
Frits 9:33 am on 19 October 2025 Permalink |
@Jim, “5,6,9 is possible” doesn’t help if that is the case.
LikeLike
Jim Randell 10:00 am on 19 October 2025 Permalink |
@Frits: I think that is just to illustrate that a record doesn’t go down the charts and then back up.
So (5, 4, 9) is viable (the record peaks at number 4 and then drops down the chart the following week). (5, 6, 9) is viable (the record peaks at 5 and then drops down the charts for the next 2 weeks). But (2, 5, 3) is not viable (the record drops down from 2 to 5, but then goes back up again to 3).
LikeLike
Frits 9:26 am on 19 October 2025 Permalink |
The wording is a bit confusing to me. A high position doesn’t seem to mean a position close to the top of the chart/pops.
“the third week’s position being the highest” and ” … 5,6,9 are possible”.
LikeLike
Brian Gladman 11:54 am on 19 October 2025 Permalink |
I agree that the wording is poor. The word ‘zigzag’ could mean (hi, lo,hi) or (lo,hi,lo) but is then defined as only one of these. And it hen gives an example that directly conflicts with an earlier constraint. It would have been easier to say ‘a hit never rises after it has fallen’. It almost seems as if the author is trying to confuse us!
LikeLike
Jim Randell 1:45 pm on 19 October 2025 Permalink |
@Brian: There is an implicit “up” to enter the Top 10, so (lo, hi, lo) is actually (up, up, down), which is allowable (not a zig-zag). But (hi, lo, hi) is (up, down, up), which is not allowed (a zig-zag)
I agree that the wording seems to be deliberately complicated, but I didn’t have any problem interpreting it.
LikeLiked by 1 person
Brian Gladman 12:10 pm on 19 October 2025 Permalink |
I am not sure of the use of the words ‘in practice’ either since it conflicts with real world experience where ‘rising after falling’ is not unusual. Even in ‘teaserland’ it is surely better to stay somewhere near reality.
LikeLike