Artificial intelligent assistant

how to solve $rem(8^{5}+9^{5},17)$ & $rem(3^{8}-4^{8},10)$ I am trying to solve $rem(8^{5}+9^{5},17)$ & $rem(3^{8}-4^{8},10)$ but don't know how to start with

One way to address the first problem: Observe that

$$ 8^5+9^5 = (8+9)(8^4-8^3\cdot9+8^2\cdot9^2-8\cdot9^3+9^4) $$

and the right side is divisible by $8+9$, of course!

Another way: Follow André Nicolas's hint and note that

$$ 8^5+9^5 \equiv 8^5+(-8)^5 = 8^5-8^5 = 0 $$

modulo $17$.

One way to address the second problem: The last digits of $3^k$ run $3, 9, 7, 1, 3, 9, 7, 1, \ldots$ and the last digits of $4^k$ run $4, 6, 4, 6, 4, 6, \ldots$. Taking the difference modulo $10$ amounts to subtracting the last digits (and adding $10$ as necessary).

Another way: Observe that

$$ 3^8-4^8 = (3^4+4^4)(3^2+4^2)(3+4)(3-4) $$

Of those terms, the second is an odd multiple of $5$, and the rest are all odd, so $\ldots$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy dc82937109caec712124717f6ee78fe0