Problem 1015: (2021 AIME I, 7)
Find the number of pairs $(m,n)$ of positive integers with $1\le m<n\le 30$ such that there exists a real number $x$ satisfying \[ \sin(mx)+\sin(nx)=2. \]
- We need $\sin mx=\sin nx=1$, i.e.\ $mx=90^\circ(4a+1)$ and $nx=90^\circ(4b+1)$, i.e.\ $n(4a+1)=m(4b+1)$.
- With $g=\gcd(m,n)$, $m=gm_1$, $n=gn_1$: this is solvable iff $m_1,n_1$ are odd and $m_1\equiv n_1\pmod4$ (take $4a+1=m_1t$, $4b+1=n_1t$ with $t$ odd).
- Counting the pairs $1\le m<n\le30$ with this property gives $63$. The answer is $\boxed{063}$.
Find the number of pairs $(m,n)$ of positive integers with $1\le m<n\le 40$ such that there exists a real number $x$ satisfying \[ \sin(mx)+\sin(nx)=2. \]