38 For any given prime $p$, how many integer triples $(a, b, c)$ are there such that
(1) $1 \leqslant a, b, c \leqslant 2 p^{2}$;
(2) $\frac{[a, c]+[b, c]}{a+b}=\frac{p^{2}+1}{p^{2}+2} \cdot c$.
38. Let $u=(a, c), v=(b, c)$, then condition (2) becomes
$$\frac{\frac{a c}{u}+\frac{b c}{v}}{a+b}=\frac{p^{2}+1}{p^{2}+2} \cdot c$$

i.e.,
$$\frac{a}{u}+\frac{b}{v}=\frac{p^{2}+1}{p^{2}+2}(a+b)$$

When $\frac{1}{2}2$, the number of arrays satisfying the condition is $p^{2}-p$.