<s>[INST] Prove by induction that for every $n \ge 0$ the term $2^{2n+1} - 9n^2 + 3n -2$ is divisible by $54$ What I get is $4 \cdot 54k + 27(n(n-1)) - 2$.
I understand first two terms but $-2$ is giving me a headache. I suppose to be true every term should be divisible by $54$. Or did I make wrong conclusion?
P. S: Is there mathjax tutorial?
 [/INST] When $n$ is even, each term of $2^{2n+1} - 9n^2 + 3n -2$ is even. When $n$ is odd, $-9n^2 + 3n$ is odd + odd = even, hence $2^{2n+1} - 9n^2 + 3n -2$ is even.
Now $2 \cdot 4^{n} - 9n^2 + 3n -2 \equiv 2 \cdot 1^n - 2 \equiv 0 \pmod 3$. Now let $n = 3k$, so $2 \cdot 64^k - 9(3k)^2 + 9k - 2 \equiv$ $ 2\cdot 1^k - 9(3k)^2 + 9k - 2 \equiv 0 \pmod 9$. Letting $k = 9m$, $2 \cdot (64^9)^m - 9(9m)^2 + 81m - 2$ $ \equiv 2 \cdot 1^m - 9(9m)^2 + 81m - 2 \equiv 0 \pmod {27}$. This is because $\phi(27) = 27(1 - 1/3) = 18$, thus $64^{18} \equiv 1 \pmod {27} \implies 64^9 \equiv ±1 \pmod {27}$. But from before, $64^k \equiv 1 \pmod 9$ for $k \in \mathbb Z^+$, so it is congruent to $1$ and not $-1$.
</s>