Question here, I'm interested in generalizing the n-th power of a matrix P, . The vector in question is

I've found two approaches to doing this, z-transform and Diagonalization but I'm getting conflicting answers with both. What answer are you getting? also, is there a program that can calculate this for any matrix (perhaps a project I could pick up later if not)? Thanks