Which type of fliter should be designed to remove 50 Hz
Highly selective notch filters require a rather long impulse response, which makes FIR an inefficient approach. A simple IIR notch filter is easily designed by zero/pole placement:

Take a 2nd order recursive filter and place two zeros at $\exp(i \omega_0)$ and $\exp(-i \omega_0)$ on the unit circle, where $\omega_0=2\pi\frac{f}{f_s}$ is the normalised center frequency of your notch. Then place two poles just inside the unit circle behind the zeros, namely at $r\exp(i\omega_0)$ and $r\exp(-i\omega_0)$ with $0&lt;r&lt;1$. These two poles will cancel the effect of the zeros beyond a certain distance. The closer the poles are to the zeros (i.e. the closer $r$ is to $1$), the sharper the notch will be. Picking the right $r$ therefore controls your bandwidth but also gives you the ability to control numerical stability and error accumulation for limited precision implementations. If you more the poles too close to the unit circle, the filter will start to behave weirdly.

Using this recipe to calculate your filter coefficients we can directly start with the z-domain transfer function
$$H(z) = \frac{\left(z-\exp(i\omega_0)\right)\left(z-\exp(-i\omega_0)\right)}{\left(z-r\exp(i\omega_0)\right)\left(z-r\exp(-i\omega_0)\right)}$$
which can be expanded to
$$H(z)=\frac{z^2-z\left(\exp(i\omega_0)+\exp(-i\omega_0)\right)+1}{z^2-z r\left(\exp(i\omega_0)+\exp(-i\omega_0) \right)+r^2}=\frac{z^2-2\cos(\omega_0)z+1}{z^2-2r\cos(\omega_0)z+r^2}$$
and cancelling $z^2$ gives you the transfer function in terms of unit delays:
$$H(z) = \frac{1-2\cos(\omega_0)z^{-1}+z^{-2}}{1-2r\cos(\omega_0)z^{-1}+r^2z^{-2}} $$
Using the definition of the transfer function $H(z)=\frac{Y(z)}{X(z)}$ for input and output signal z-transforms $X(z)$ and $Y(z)$ respectively results in the z-transform of the filter recursion:
$$Y(z)\left(1-2r\cos(\omega_0)z^{-1}+r^2z^{-2} \right)=X(z)\left(1-2\cos(\omega_0)z^{-1}+z^{-2} \right)$$
Inverting the z-transform takes us to discrete time domain:
$$y[n]-2r\cos(\omega_0)y[n-1]+r^2y[n-2]=x[n]-2\cos(\omega_0)x[n-1]+x[n-2]$$
Finally, we can solve for the output signal at time $n$ and get the recursive filter equation
$$y[n]=x[n]-2\cos(\omega_0)x[n-1]+x[n-2]+2r\cos(\omega_0)y[n-1]-r^2y[n-2]$$
This equation gives you the most recent output sample in terms of the three most recent input samples and the prior two output samples. As initial condition you can assume that all recent samples are 0.