๐ด Hard Riddles (page 9)
Brain-bending number tricks, logic traps and word puzzles for when you want a real challenge. Page 9 of 10: riddles 201โ225 of 240.
Testing each prime p up to 50 for 100 โ p also being prime gives exactly six pairs.
How many prime numbers are there below 200?
Sieving out composites leaves 46 primes below 200.
Brute force over all seven-digit numbers finds only 3211000, whose digits match its own counts of 0s, 1s, 2s and so on.
What comes next: 1, 2, 3, 5, 7, 11, 15, ...? (Each term counts something about whole numbers.)
The terms are the partition numbers p(n) for n = 1 to 8, and p(8) = 22.
What comes next: 1, 2, 5, 14, 42, 132, ...?
These are the Catalan numbers C(n) = (2n)!/(n!(n+1)!), and C(7) = 429.
What comes next: 1, 2, 4, 10, 26, 76, ...?
Involution counts satisfy a(n) = a(nโ1) + (nโ1)ยทa(nโ2), so the next term is 76 + 6 ร 26 = 232.
What comes next: 0, 1, 2, 9, 44, 265, ...?
Derangement numbers satisfy !n = nยท!(nโ1) + (โ1)^n, so the next term is 7 ร 265 โ 1 = 1,854.
Applying Q(n) = Q(n โ Q(nโ1)) + Q(n โ Q(nโ2)) gives Q(12) = Q(6) + Q(6) = 4 + 4 = 8.
What comes next: 4, 8, 10, 12, 15, 17, ...? (Think about primes.)
The terms are ฯ(10), ฯ(20), ..., ฯ(60) = 4, 8, 10, 12, 15, 17, and the next term is ฯ(70) = 19.
What comes next: 1, 1, 2, 5, 16, 61, ...? (These count 'alternating permutations'.)
These are the Euler zigzag (up-down) numbers, whose seventh value is 272.
A breadth-first search over all fill, empty and pour states finds 10 moves as the fewest needed for 7 litres.
Filling the 12-litre jug and pouring it into the 7-litre jug leaves exactly 5 litres in the large jug, and a search confirms one move is not enough.
A breadth-first search over all states gives 14 moves as the fewest for 8 litres.
A breadth-first search over all vessel states gives 15 pours as the fewest to leave 8 litres in each of the 16- and 9-litre vessels.
A breadth-first search over all states that keep every wife safe finds 11 crossings as the shortest plan.
Positions of the form 7k or 7k + 2 are losing for the player to move, and 41 โ 4 = 37 is the only winning first move.
Leaving 48, a multiple of 6, lets you answer each opponent move so that every round removes 6 stones.
The every-second-person Josephus rule with n = 100 = 64 + 36 gives survivor 2 ร 36 + 1 = 73, and a simulation agrees.
Simulating the every-third-person elimination among 41 people leaves person 31.
Row by row: 16 3 2 13 / 5 10 11 8 / 9 6 7 12 / 4 15 14 1; a backtracking search finds this as the only completion.
An exhaustive count of domino placements gives 36 tilings of a 4 ร 4 board (3 ร 4 gives 11).
A breadth-first search over knight moves gives 6 as the shortest route from a1 to h8, which is consistent with both corners being the same colour.
Enumerating all four-point subsets of the 25 lattice points and testing for squares gives 50, including 20 tilted ones.
The k-th cut crossing all earlier cuts adds k pieces, so the total is 1 + (1 + 2 + ... + 10) = 56.
Asking 'If I asked you whether X, would you say ja?' makes True and False gods answer alike, which is the standard way to locate the Random god first (the three-question plan was not brute-forced over every strategy).
Answers: Hard Riddles (page 9)
- 6 ways
- 46
- 3211000
- 22
- 429
- 232
- 1,854
- 8
- 19
- 272
- 10 moves
- Fill 12, pour into 7 (2 moves)
- 14 moves
- 15 pours
- 11 crossings
- Take 4 stones
- Take 2 stones
- 73
- 31
- The Dรผrer square (grid in explanation)
- 36 tilings
- 6 moves
- 50 squares
- 56 pieces
- Ask embedded 'ja or da' questions
wibipuzzles.com