I doubt if there is a Theorem to cover it, but note the pattern as we increase the power of X. We get
where b is either 1 less or 1 more than a depending on whether the power is even or odd. Also a+b is 1 more or 1 less than 2b. So we only have to work out a and know the power of X to find all three remaining elements of the matrix. For example, X² has a=9; so b=8 (because the power 2 is even), 2b=16 and a+b=17.