linear difference equations and their analytic solutions