Solution (source code)

= Solution

For weak linear <damping>, write the amplitude envelope as $A(t)=A_0e^{-\omega_0t/(2Q)}$. The amplitude e-folding time is $2Q/\omega_0$, and one period is approximately $2\pi/\omega_0$. Thus
$$
\boxed{N=\frac Q\pi=31.8\text{ oscillations}.}
$$
Energy, being proportional to amplitude squared, decays twice as rapidly in its exponent. Using its e-folding time instead would introduce a factor-of-two error.