<s>[INST] Prove without induction that $2×7^n+3×5^n-5$ is divisible by $24$. I proved this by induction. But I want to show it using modular arithmetic. I tried for sometime as follows
$$2×7^n-2+3×5^n-3\\
2(7^n-1)+3(5^n-1)\\
2×6a+3×4b\\
12(a+b)$$
In this way I just proved that it is divisible by 12 but it is not enough. Am I missing something or it will solved by some other method.
 [/INST] You may split it up by calculating $\mod 8$ and $\mod 3$:


*

*$\mod 8$:
\begin{eqnarray*} 2×7^n+3×5^n-5
& \equiv_8 & 2\times (-1)^n + 3\times (-3)^n +3 \\
& \equiv_8 & 2\times (-1)^n + 3((-3)^n + 1)\\
& \stackrel{3^2 \equiv_8 1}{\equiv_8}& \begin{cases} 2+3\times (1+1) & n = 2k \\ -2 +3 (-3 + 1) & n= 2k+1\end{cases}\\
& \equiv_8 & 0
\end{eqnarray*}

*$\mod 3$:
\begin{eqnarray*} 2×7^n+3×5^n-5
& \equiv_3 & 2\times 1^n + 3\times (-1)^n +1 \\
& \equiv_3 & 3\times (1 + (-1)^n)\\
& \equiv_3 & 0
\end{eqnarray*}
</s>