Solution (source code)

= Solution

Let $q_1$ and $q_n$ be the first and last columns of $\widetilde Q_k$. Since $\widetilde R_k$ is upper triangular,
$$
A^ke_1=(\widetilde R_k)_{11}q_1.
$$
Thus $q_1$ is the normalized $k$th <power method> iterate starting from $e_1$.

Taking the transpose of $A^k=\widetilde Q_k\widetilde R_k$ and using symmetry gives $A^k=\widetilde R_k^T\widetilde Q_k^T$. Therefore
$$
A^kq_n=(\widetilde R_k)_{nn}e_n,
\qquad
q_n=(\widetilde R_k)_{nn}A^{-k}e_n.
$$
So the last column is the normalized $k$th <inverse iteration> iterate with shift zero and starting <vector> $e_n$.