  In this paper we present an algorithm to find the discrete Lagrangian for an
autonomous recurrence relation of arbitrary even order $2k$ with $k>1$. The
method is based on the existence of a set of differential operators called
annihilation operators which can be used to convert a functional equation into
a system of linear partial differential equations. This completely solves the
inverse problem of the calculus of variations in this setting.
