Example 5 Find all positive integers $n$, such that $n+36$ is a perfect square, and apart from 2 or 3, $n$ has no other prime factors.

Find all positive integers $n$, such that $n+36$ is a perfect square, and apart from 2 or 3, $n$ has no other prime factors.
Let $n+36=(x+6)^{2}$. Then $n=x(x+12)$.
According to the problem, $n=2^{\alpha_{1}} \times 3^{\alpha_{2}}\left(\alpha_{1} 、 \alpha_{2} \in \mathrm{N}\right)$.
Then $x=2^{a_{1}} \times 3^{b_{1}}, x+12=2^{a_{2}} \times 3^{b_{2}}$, where $a_{1} 、 b_{1} 、 a_{2} 、 b_{2} \in \mathbf{N}$.
Thus, $2^{a_{2}} \times 3^{b_{2}}-2^{a_{1}} \times 3^{b_{1}}=12$.
Obviously, when $a_{1}=a_{2}=0$, equation (1) does not hold. Therefore, $a_{1} 、 a_{2}$ must include positive integers.
Thus, both $x$ and $x+12$ are even.
Therefore, $a_{1} 、 a_{2} \in \mathbf{N}_{+}$.
(1) If $a_{2}=1$, then
$$
2 \times 3^{b_{2}}=12+2^{a_{1}} \times 3^{b_{1}} \Rightarrow a_{1}=1 \text {. }
$$

At this point, $3^{b_{2}}=6+3^{b_{1}}$.
Obviously, $b_{1}=1, b_{2}=2$.
At this point, $x=6, x+12=18$.
Thus, $n=6 \times 18=108$.
(2) If $a_{2} \geqslant 2$, then $4|(x+12) \Rightarrow 4| x$. Hence $a_{1} \geqslant 2$.
At this point, from equation (1) we get
$$
2^{a_{2}-2} \times 3^{b_{2}}-2^{a_{1}-2} \times 3^{b_{1}}=3 \text {. }
$$

Obviously, at least one of $a_{2}=2, a_{1}=2$ holds. From the former, we get
$$
3^{b_{2}}-2^{a_{1}-2} \times 3^{b_{1}}=3 \text {. }
$$

Thus, $b_{2}>b_{1}=1$.
Therefore, equation (3) becomes $3^{b_{2}-1}-2^{a_{1}-2}=1$.
Solving, we get $\left(a_{1}, b_{2}\right)=(3,2),(5,3)$.
Thus, $x=24,96 ; n=864,10368$.
From the latter, we get
$$
2^{a_{2}-2} \times 3^{b_{2}}-3^{b_{1}}=3 \text {. }
$$

At this point, $a_{2}-2>0$, so $b_{2} \leqslant 1$.
If $b_{2}=0$, then equation (4) becomes $2^{a_{2}-2}-3^{b_{1}}=3$.
Solving, we get $\left(a_{2}, b_{1}\right)=(4,0)$.
Thus, $x=4, n=64$.
If $b_{2}=1$, then equation (4) becomes $2^{a_{2}-2}-3^{b_{1}-1}=1$.
Solving, we get $\left(a_{2}, b_{1}\right)=(4,2),(3,1)$.
Thus, $x=12,36 ; n=288,1728$.
In summary, the required $n$ are
$$
64,108,288,864,1728,10368
$$