From The Sunday Times, 31st October 1982 [link]
Teacher was introducing his class to the binary system of notation (wherein the unit values attaching to successive digits from right to left of any integer are 1, 2, 4, 8, 16, etc., as against 1, 10, 100, 1000, etc., in the decimal system).
He went on to explain that many arithmetical relationships are equally valid in both the binary and decimal systems. And gave as the simplest example:
10 × 11 = 110
which in the binary system represents 2 × 3 = 6, pointing out this difference however – that while both factors 10 and 11 are primes in the binary system, only 11 is prime in the decimal system.
Developing this theme he observed that very often such relationships could be described as “pan-palindromic”, in the sense that both of the factors, as well as their product, are numerical palindromes (i.e. each of the three integers reads the same forwards as backwards). His first example was:
1001 × 10101 = 10111101
(which in the binary system represents 9 × 21 = 189), and he pointed out how this time neither factor was a prime using either the binary or decimal system (being patently divisible by 11 and 3 respectively).
He contrasted this with another example:
111 × 1001001 = 111111111
which in the binary system represents: 7 × 73 = 511, where both factors are primes in the binary system, but neither of them are in the decimal system (both being divisible by 3).
To test how well his pupils were taking in all this, he told them to proceed on their own and write down any binary palindromes they could find, of less than twelve digits, which simultaneously, in both binary and decimal systems, factorised into just two different palindromic primes.
What should they have written down?
[teaser1057]
Jim Randell 9:42 am on 11 April 2023 Permalink |
I assumed each valid number plate is a rearrangement of all allowable digits (each appearing exactly once).
This Python program constructs the valid plates, and counts those divisible by 5. It runs in 189ms.
Run: [ @replit ]
from enigma import (irange, subsets, nconcat, fraction, printf) # solve the puzzle qs = dict(A=irange(1, 9), B=irange(1, 8), C=irange(1, 7)) for k in sorted(qs.keys()): ds = qs[k] # count plates divisible by 11 (t) and those divisible by 5 (n) t = n = 0 for s in subsets(ds, size=len, select='P'): p = nconcat(s) if p % 11 == 0: t += 1 if p % 5 == 0: n += 1 # find the fraction (a, b) = fraction(n, t) # output solution printf("{k}: {t} plates, {n} divisible by 5 = {a}/{b}")Solution: (a) 1 in 11; (b) 1 in 8; (c) 1 in 8.
The counts for total number of plates, and permitted plates are:
LikeLike