\begin{align*} A \amp = 1 + 3x + 7x^2 + 15x^3 + 31x^4 + \cdots + a_nx^n + \cdots\\ -3xA \amp = 0 - 3x - 9x^2 - 21x^3 - 45x^4 - \cdots - 3a_{n-1}x^n - \cdots\\ \underline{+~~~2x^2A_{~}^{~^{~}}} \amp \underline{\,\, = 0 + 0x + 2x^2 + 6x^3 + 14x^4 + \cdots + 2a_{n-2}x^n + \cdots}\\ (1-3x+2x^2)A \amp = 1 \end{align*}
in-context