2021 AIME II Problem 9

Find the number of ordered pairs (m, n) such that m and n are positive integers in the set \{1,2, \ldots, 30\} and the greatest common divisor of 2^{m}+1 and 2^{n}-1 is not 1 .