Teaser 2463: [Single-digit multiples]
From The Sunday Times, 6th December 2009 [link]
I have used each of the digits 0 to 9 once each to make a one-digit number, a two-digit number, a three-digit number and a four-digit number. The fourth number is a single-digit multiple of the third; the third number is a single-digit multiple of the second; and the second is a single-digit multiple of the first.
What is the four-digit number?
This puzzle was originally published with no title.
[teaser2463]
Jim Randell 11:17 am on 2 January 2026 Permalink |
Here is a solution using the [[
SubstitutedExpression]] solver from the enigma.py library:It runs in 85ms. (Internal runtime of the generated code is 8.8ms).
Solution: The 4-digit number is 3402.
We have:
And between them the numbers 9, 81, 567, 3402 use each of the digits 0-9 exactly once.
LikeLike
Ruud 2:21 pm on 2 January 2026 Permalink |
Here is recursive solution:
import istr def expand(n="", used=[]): for d in range(1, 10): next_n = d * istr(n if n else 1) next_used = used + [next_n] if len(next_n) == len(n) + 1 and istr("").join(next_used).all_distinct(): if len(next_n) == 4: print(*next_used) else: expand(n=next_n, used=next_used) expand()LikeLike
GeoffR 4:54 pm on 2 January 2026 Permalink |
LikeLike