How many two-digit numbers are there, such that the predecessor and the successor are a prime and a perfect square, not necessarily in this order?
Problem 642
Pick one
Official solution
Perfect squares that are also predecessors or successors of two-digit numbers are , , , , , , and . Two-digit numbers that have a perfect square as their successors or predecessors are therefore , , , , , , , , , , , , and . But a two-digit number that is preceded or succeeded by a prime must be even, so the only options are , , , , , and . Out of these, the only ones with a prime neighbour are , , , and . All five of these satisfy the condition. Thus, the correct answer is .