  Lie group analysis of the difference equations of the form \begin{align*}
x_{n+1} =\frac{x_{n-4}x_{n-3}}{x_{n}(a_n +b_nx_{n-4}x_{n-3}x_{n-2}x_{n-1})},
\end{align*} where $a_n$ and $b_n$ are real sequences, is performed and
non-trivial symmetries are derived. Furthermore, we find find formulas for
exact solutions of the equations. This work generalizes a recent result by
Elsayed [Elsayed, E.M.: {Expression and behavior of the solutions of some
rational recursive sequences}. {Math. Meth. Appl. Sci.} { \bf
2016:39},5682--5694 (2016)].
