Prove by mathematical induction that $(3n+1)7^n -1$ is divisible by $9$ for integral $n>0$ $7^n(3n+1)-1=9m$
$S_k = 7^k(3k+1)-1=9P$
$\Rightarrow 7^k(3k+1) = 9P+1$
$S_{k+1} = 7\cdot7^k(3(k+1)+1)-1$
$= 7\cdot7^k(3k+1+3)-1$
$= 7\cdot7^k(3k+1) +21\cdot7^k -1$
$= 7(9P+1)+21\cdot7^k -1$
$= 63P+7+21\cdot7^k -1$
$= 63P+6+21\cdot7^k$
$= 9(7P +2/3+21\cdot7^k/9)$
therefore it is divisible by $9$
So I believe I have done this right but I've ended up with non-integers in the answer which im pretty sure isn't right.
Where have I gone wrong?
Thanks

Another, less elegant way of proving it is using modular arithmetic. In essence, we show that if
$$7^n(3n+1)-1\equiv0 \mod9$$
And, for the inductive step,
$$7^{n+1}(3(n+1)+1)-1=7^{n+1}(3n+4)-1=7(7^n(3n+1)-1+1+3\cdot7^n)-1$$
Using congruence mod $9$:
$$6+3\cdot7^n\equiv0\mod9$$
For all $n\in\mathbb{Z}_9$, which implies what we wanted to show.
