Two Consecutive Numbers
The puzzle
Two logicians each have a positive whole number on their forehead, and they are told the two numbers are consecutive. Each can see the other's number but not their own.
They are asked in turn, repeatedly, whether they know their own number. A says no, B says no, A says no, B says no, and then A says yes. What are the numbers?
Stuck?
One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.
Hint 1
Start with the smallest case. If A saw a 1, A would know their own number immediately. Why?
Hint 2
Each "no" pushes the possible numbers up by one. Count the nos.
Show the answer Hide the answer
A has 5 and B has 4.
How to get there
If A saw 1 on B, A would know their own was 2, since 0 is not a positive number. A's first "no" therefore tells B that B is not 1.
B now knows B is at least 2. If B saw 2 on A, B would know B was 3 - because B being 1 has been ruled out. B's "no" tells A that A is not 2. The third answer rules out 3, the fourth rules out 4.
So after four nos, both know their own number exceeds the values eliminated so far. A says yes on the fifth turn, which pins A at 5, and since B's number is consecutive and lower, B has 4. Each round removes exactly one possibility, so the count of nos is the answer.
The technique worth keeping
Build the ladder from the base case upwards: establish what the smallest value would have revealed, then ask what each denial eliminates. The number of rounds before someone speaks is the size of the answer.