Solution (source code)

= Solution

Choose the positive axis from the approaching source towards the observer. The photon that reaches the observer is emitted forward, with source-frame <four-momentum> $(E/c,E/c,0,0)$. Boosting to the observer frame gives $E_{\rm obs}=\gamma E(1+\beta)$, where $\beta=v/c$. Since photon <energy> is $h_{\rm P}\nu$,
$$
\boxed{\nu=\frac E{h_{\rm P}}\gamma(1+\beta)=\frac E{h_{\rm P}}\sqrt{\frac{1+v/c}{1-v/c}}.}
$$
This is the approaching-source <relativistic Doppler effect>. A photon emitted in a general source-frame direction would instead have the factor $\gamma(1+\beta\cos\theta_*)$; forward emission is the geometry of the photon directed to the observer here.