Let $S = \{(m, n) : m, n \in \{1, 2, 3, \ldots, 50\}\}$. If the number of elements $(m, n)$ in $S$ such that $6^m + 9^n$ is a multiple of 5 is $p$ and the number of elements $(m, n)$ in $S$ such that $m + n$ is a square of a prime number is $q$, then $p + q$ is equal to ________.
Numerical-value question: the answer is a number.
Show answer
The answer is 1333.
Official NTA final key