Brain-Teaser 21: [Crossnumber]
From The Sunday Times, 13th August 1961 [link]
Across:
1a. Square of a multiple of 11.
5a. A fourth power.
8a. A multiple of 2d.
9a. A cube reversed.
11a. If added to 4d it gives a square.
12a. 3 times a prime number.
14a. A multiple of 11.
16a. A prime number.
17a. A cube, which is also the sum of three cubes.
18a. An even number.
20a. A multiple of 12.
21a. A prime number.
22a. The square of a palindromic number.Down:
1d. The product of two consecutive numbers (neither a prime).
2d. See 8a.
3d. A cube.
4d. See 11a.
6d. The sum of the digits of 3d.
7d. The square of (6d reversed).
10d. The product of two consecutive odd numbers.
13d. The product of two consecutive even numbers.
15d. A cube.
16d. A square.
19d. An even multiple of (18a + 21a).
This puzzle was originally published with no title.
[teaser21]

Jim Randell 9:18 am on 14 February 2021 Permalink |
I used the [[
SubstitutedExpression]] solver from the enigma.py library to solve this puzzle.The following run file executes in 333ms.
(Using the standard Python interpreter we need to provide the additional [[
--denest]] parameter to work around the limit on statically nested blocks. This is not required if using the PyPy interpreter).Run: [ @replit ]
#! python3 -m enigma -rr # A B C D E F G # H I J K L M N # P # Q R S # T # U V W # X Y Z # a b c d e f g # h i # # # j k # m n p q r s t SubstitutedExpression --distinct="" --reorder=0 # 1a. = ABCD "Square of a multiple of 11" "is_square({ABCD}) % 11 = 0" # 11a. = QR "If added to 4d. it gives a square" # 4d. = DKR "See 11 across" "is_square({DKR} + {QR})" # 8a. = HIJ "A multiple of 2d." # 2d. = BI "See 8 across" "{HIJ} % {BI} = 0" # 3d. = CJQWc "A cube" "is_cube({CJQWc})" # 6d. = FM "The sum of the digits of 3d." "dsum({CJQWc}) = {FM}" # 7d. = GNTZ "The square of (6d. reversed)" "{MF} ** 2 = {GNTZ}" # 5a. = EFG "A fourth power" "is_power({EFG}, 4)" # 12a. = UVW "Three times a prime number" "is_prime(div({UVW}, 3))" # 1d. = AHPU "The product of two consecutive numbers (neither a prime)" --code=" def check_1d(n): k = isqrt(n) return n == k * (k + 1) and not(is_prime(k) or is_prime(k + 1)) " "check_1d({AHPU})" # 13d. = Vbin "The product of 2 consecutive even numbers" --code=" def check_13d(n): k = isqrt(div(n, 4)) return n == 4 * k * (k + 1) " "check_13d({Vbin})" # 16a. = ab "A prime number" "is_prime({ab})" # 20a. = hi "A multiple of 12" "{hi} % 12 = 0" # 16d. = ahm "A square" "is_square({ahm})" # 17a. = cde "A cube, which is also the sum of three cubes" --code=" def check_17a(n, k=3): if k == 1: return is_cube(n) else: for x in powers(1, inf, 3): if k * x > n: break if check_17a(n - x, k - 1): return True return False " "is_cube({cde}) and check_17a({cde})" # 10d. = LSXe "The product of 2 consecutive odd numbers" "is_square(div({LSXe} + 1, 4))" # 14a. = XYZ "A multiple of 11" "{XYZ} % 11 = 0" # 9a. = KLMN "A cube reversed" "is_cube({NMLK})" # 21a. = jk "A prime number" "is_prime({jk})" # 15d. = Yfjs "A cube" "is_cube({Yfjs})" # 19d. = gkt "An even multiple of (18a. + 21a.)" "div({gkt}, {fg} + {jk}) % 2 = 0" # 18a. = fg "An even number" "{fg} % 2 = 0" # 22a. = npqrs "The square of a palindrome" "is_palindrome(nsplit(is_square({npqrs})))" # [optional] --template="{ABCD} {EFG} | {HIJ} {KLMN} | {P} {QR} {S} {T} | {UVW} {XYZ} | {ab} {cde} {fg} | {hi} {jk} | {m} {npqrs} {t}" --solution="" --header=""Solution: The completed grid looks like this:
LikeLike