The following subroutine uses z-transforms to construct solutions to a second order homogeneous difference equation.
Mathematica Subroutines (Solution of a Difference Equation).
(c) 2006 John H. Mathews, Russell W. Howell