From The Sunday Times, 1st October 1978 [link]

Margaret was demonstrating the use of a pocket calculator to her grandfather. (Keyboard shown above). It was of the type having algebraic logic, which does continuous mixed calculations (e.g. 5 + 2 × 3 = 21). She also demonstrated that keying two consecutive operations results in the second taking preference (e.g. 5 +× 2 = 10).
Margaret asked grandfather to calculate 80 × 5 + 40 − 10; but unfortunately grandfather’s hands were a little shaky and he was prone to strike keys horizontally oг vertically adjacent to the correct one.
Having entered the sum grandfather was about to press the = key (fortunately he hadn’t pressed it before) when Margaret stopped him.
“You have made just two errors so far, and they were consecutive”, she said, “but don’t worry, if you divide by your age on your next birthday, then press the = key, you will get the correct answer to the calculation”.
Grandfather completed the calculation and correctly pressed the = key.
“Wrong again”, said Margaret, “interesting answer though — if you deduct grandmother’s age, and take the cube root of the remainder, you will get the sum of your age, and mine, on our last birthdays”.
How old are Margaret, grandmother and grandfather?
Another early calculator-based puzzle.
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 2 (1981). The puzzle text above is taken from the book.
[teaser895]
Jim Randell 2:44 pm on 18 September 2026 Permalink |
This Python program labels the 12 edges of the cube, and then uses the [[
SubstitutedExpression]] solver from the enigma.py library, to assign different values from 1 to 15 to each edge. We then look at the 3 unused numbers, and check they have the same parity.It runs in 247ms. (Internal runtime is 173ms).
from enigma import ( SubstitutedExpression, irange, subsets, intersect, diff, join, sprintf as f, map2str, printf ) # label the edges A .. L vertices = "ABE BCF CDG DAH ELI FIJ GJK HKL".split() faces = "ABCD BEFI CFGJ DGHK AHEL".split() # collect expressions exprs = list() fsum = lambda xs: join(xs, sep=" + ") # find vertices/faces that share an edge for xs in [vertices, faces]: for (x1, x2) in subsets(xs, size=2): es = intersect([x1, x2]) if not es: continue exprs.append(f("{x1} == {x2}", x1=fsum(diff(x1, es)), x2=fsum(diff(x2, es)))) # remove equivalent rotations/reflections exprs.extend(["A < min(B, C, D, E, F, G, H, I, J, K, L)", "B < min(D, E, H)"]) # construct a solver digits = list(irange(1, 15)) p = SubstitutedExpression(exprs, base=16, digits=digits) for s in p.solve(verbose=0): # find unused digits xs = diff(digits, s.values()) # all unused digits have the same parity if len({x % 2 for x in xs}) > 1: continue # output solution (unused values and labelling of edges) printf("unused values = {xs}") printf("-> {s}", s=map2str(s))Solution: The unused numbers are: 2, 8, 14.
The (incorrect) solution published in the paper was: “2, 8 and 15”.
Here is a diagram showing the labelling of the edges of the cube:
(Rotations/reflections of this arrangement also give viable solutions).
There are also 5 essentially different ways to label the cube where the unused numbers have a mix of even and odd parities. In these labellings the unused numbers are:
These can be seen by removing the condition at line 31 of the program.
LikeLike