What equation predicts the amplitudes of harmonics from a square/triangle/sawtooth/pulse oscillator?
This is what Fourier series are all about. Under relatively mild conditions, a $T$-periodic function $f(t)$ can be represented as an infinite sum of complex exponentials:
$$f(t)=\sum_{k=-\infty}^{\infty}c_ke^{j2\pi kt/T}\tag{1}$$
Note that if $f(t)$ is real-valued, $(1)$ can equivalently be written as a sum of real-valued sinusoids:
$$f(t)=c_0+2\sum_{k=1}^{\infty}|c_k|\cos\left(\frac{2\pi kt}{T}+\phi_k\right)\tag{2}$$
with $c_k=|c_k|e^{j\phi_k}$. From $(2)$ it should be clear that not only the amplitudes $2|c_k|$ of the individual sinusoids but also the phases $\phi_k$ are important.
The complex Fourier coefficients $c_k$ are given by
$$c_k=\frac{1}{T}\int_{0}^{T}f(t)e^{-j2\pi kt/T}dt\tag{3}$$