MathDB
find all fancy pairs of (a,b)

Source: STEMS 2024, CAT A, P1

December 17, 2023
combinatorics

Problem Statement

Let nn be a positive integer and S={m2nm<2n+1}S = \{ m \mid 2^n \le m < 2^{n+1} \}. We call a pair of non-negative integers (a,b)(a, b) fancy if a+ba + b is in SS and is a palindrome in binary. Find the number of fancy pairs (a,b)(a, b).