  We derive the discrete version of the classical Helmholtz condition.
Precisely, we state a theorem characterizing second order finite differences
equations admitting a Lagrangian formulation. Moreover, in the affirmative
case, we provide the class of all possible Lagrangian formulations.
