Example 37 (2003 National High School Competition Question) Let the lengths of the three sides of a triangle be integers $l, m, n$, and $l > m > n$. It is known that $\left\{\frac{3^{l}}{10^{4}}\right\}=\left\{\frac{3^{m}}{10^{4}}\right\}=\left\{\frac{3^{n}}{10^{4}}\right\}$, where $\{x\}=x-[x]$, and $[x]$ represents the greatest integer not exceeding $x$. Find the minimum perimeter of such a triangle.
From the given, we have $\frac{3^{l}}{10^{4}}-\left[\frac{3^{l}}{10^{4}}\right]=\frac{3^{m}}{10^{4}}-\left[\frac{3^{m}}{10^{4}}\right]=\frac{3^{n}}{10^{4}}-\left[\frac{3^{n}}{10^{4}}\right]$. Multiplying both sides of the equation by $10^{4}$ and taking modulo $10^{4}$, we get
$$
3^{l} \equiv 3^{m} \equiv 3^{n}\left(\bmod 10^{4}\right) \Leftrightarrow\left\{\begin{array}{l}
3^{l} \equiv 3^{m} \equiv 3^{n}\left(\bmod 2^{4}\right), \\
3^{l} \equiv 3^{m} \equiv 3^{n}\left(\bmod 5^{4}\right) .
\end{array}\right.
$$

Since $(3,2)=1$, from (1) we can get $3^{l-n} \equiv 3^{m-n} \equiv 1\left(\bmod 2^{4}\right)$.
Assume $u$ is the smallest positive integer satisfying $3^{u} \equiv 1\left(\bmod 2^{4}\right)$, then for any positive integer $v$ satisfying $3^{v} \equiv 1\left(\bmod 2^{4}\right)$, $u$ divides $v$. In fact, if $u \times v$, let $v=k u+r$, where $k, r$ are integers and $0<r<u$. Since $m>n$, we know $r>s$. Thus, the lengths of the three sides of the triangle are $500 r+n, 500 s+n$ and $n$. Since the difference between two sides of a triangle is less than the third side, we have $n>500(r-s)$. Therefore, when $s=1, r=2, n=501$, the perimeter of the triangle is minimized, with the value being
$$
(500 \times 2+501)+(500 \times 1+501)+501=3003
$$