When traveling through the vacuum, electromagnetic waves experience an increase of wavelength (redshift).   According to this equation:  $$E=\frac{hc}{\lambda}=h\nu$$  ( Where, as we know, h is the Plank constant, c is the light speed, λ is the wavelenght and ν is the frequency of the wave. )  An increment of the wavelength implies a decrement of the energy of the photon.  The question is, where does that energy go? Is it consumed during millions of years of movement of the EM or is there another explanation?
A photon emitted from a receding source (Doppler redshift) has less energy when detected at an observer's location. Please explain the energy loss from the perspective of energy conservation.
I was studying a  problem where optical light with a wavelength of 500&nbsp;nm travels through a gas with refractive index $n$.  If we look at the equations for wave motion and index of refraction  $$c=\lambda_0\nu\quad\text{(in vacuum)}$$  $$v = \lambda\nu\quad\text{(in medium)}$$  $$n = c/v$$  we see that, if the frequency is constant, the wavelength decreases in the medium compared to vacuum. Is this a consistent property at all frequencies and for all mediums with refractive index real and greater than 1?  Are there dielectrics which change the frequency (still for n > 1), and is there an example of that?