General formula for phonon-assisted n -photon absorption in solids