Masses from inhomogeneous partial difference equations