Teaser 3311: Calling from home
From The Sunday Times, 8th March 2026 [link] [link]
Edna is charged a single digit number of pence for each call to a mobile. A smaller whole number of pence is charged for every minute or part minute for which each mobile call exceeds five minutes. She spent exactly an hour in real time on mobile calls with the shortest call being less than a minute and each of the other four calls rounding up to different prime numbers of minutes. Curiously, the product of the primes is a palindrome; the sum of its digits being a single digit odd number.
The total charge for the five calls was a palindromic number of pence. If I told you whether that number was odd or even, you would know what it was.
In increasing order, what are the two palindromic numbers?
[teaser3311]




Jim Randell 7:17 am on 8 March 2026 Permalink |
This Python program runs in 72ms. (Internal runtime is 519µs).
from enigma import (defaultdict, irange, primes, subsets, multiply, is_npalindrome, dsum, printf) # calculate the total cost for a call of <m> chargeable minutes # <a> pence for the first 5 minutes, <b> pence per minute thereafter def cost(a, b, m): t = a if m > 5: t += b * (m - 5) return t # group candidate results by parity r = defaultdict(list) # choose 4 primes with a sum between 59 and 64 and a palindromic product for ps in subsets(primes.between(2, 49), size=4): t = sum(ps) if not (59 <= t <= 64): continue p = multiply(ps) if not is_npalindrome(p): continue d = dsum(p) if not (d < 10 and d % 2 == 1): continue printf("{ps} -> sum={t}, prod={p}") # chargeable durations for the 5 calls ms = [1] ms.extend(ps) # choose the tariff values for (b, a) in subsets(irange(1, 9), size=2): t = sum(cost(a, b, m) for m in ms) if not is_npalindrome(t): continue printf("-> a={a} b={b} -> t={t}") r[t % 2].append((a, b, ms, t, p)) # look for unique solutions by parity for (k, vs) in r.items(): if len(vs) != 1: continue (a, b, ms, t, p) = vs[0] printf("parity={k} -> a={a} b={b} ms={ms}, t={t} p={p}")Solution: The two palindromic numbers are: 292 and 10101.
The tariff is 8p for the first 5 minutes and 6p per minute thereafter.
The chargeable lengths of the 5 calls are:
The product of the 4 primes is: 3 × 7 × 13 × 37 = 10101, which as required is a palindrome with a digit sum (3) that is an odd single digit. (And this is the only candidate collection of 4 primes with an appropriate total that has a palindromic product).
The total charge for the 5 calls is: 8 + 8 + 20 + 56 + 200 = 292p, which is also a palindrome.
And the (8p, 6p) tariff is the only candidate where the total charge is an even palindrome.
Example call lengths that give rise to the chargeable call lengths above are: 0:48, 2:48, 6:48, 12:48, 36:48, which have a total combined length of 60:00 exactly.
LikeLike
Ruud 11:08 am on 8 March 2026 Permalink |
import peek import istr istr.repr_mode("int") collect = {False: [], True: []} for durations in istr.combinations(istr.primes(60), 4): durations = [1, *durations] prod = istr.prod(durations) if 60 <= sum(durations) <= 64 and prod.is_palindrome() and sum(prod) in (1, 3, 5, 7): for extra_charge, charge in istr.combinations(range(1, 10), 2): total = sum(charge + max(duration - 5, 0) * extra_charge for duration in durations) if total.is_palindrome(): solution = sorted((prod, total)) collect[total.is_even()].append(peek(solution, prod, durations, charge, extra_charge, total, as_str=True, use_color=False)) print(*[v[0] for v in collect.values() if len(v) == 1])Note this requires istr>=1.1.26
LikeLike
Ellen Napier 6:22 pm on 10 March 2026 Permalink |
I’m getting only one set of primes that satisfies the requirements, and this
set produces exactly one even palindrome but more than one odd palindrome for a
possible total charge. I don’t see how that would result in a distinguishable
answer.
LikeLike
Jim Randell 9:37 pm on 10 March 2026 Permalink |
@Ellen: But the puzzle text says that if you were told the parity of the second palindrome you would know its value. And there is only one parity for which you would know the value for certain, so that must be the actual parity, and that gives the answer to the puzzle.
LikeLike