1200
Remainder at Five — Editorial
algebrapolynomialsmodular arithmetic
Working modulo x2−x+1x^2 - x + 1 we have x2≡x−1.x^2 \equiv x - 1. Multiplying by xx gives
x3≡x2−x≡(x−1)−x=−1.x^3 \equiv x^2 - x \equiv (x-1) - x = -1.
Thus
x2026=(x3)675⋅x≡(−1)675x=−x,x^{2026} = (x^3)^{675} \cdot x \equiv (-1)^{675} x = -x,
so x2026+1≡1−x.x^{2026} + 1 \equiv 1 - x. The remainder is R(x)=1−x,R(x) = 1 - x, and
R(5)=1−5=−4.R(5) = 1 - 5 = -4.