If $\alpha,\beta,\gamma$ are the roots of equation $x^3-7x^2+12x-11=0$, find the last four digits of $\alpha^{21007}+\beta^{21007}+\gamma^{21007}$ 
If $\alpha,\beta,\gamma$ are roots of the equation $x^3-7x^2+12x-11=0$, then find the last four digits of $\alpha^{21007}+\beta^{21007}+\gamma^{21007}$.

I know that $\alpha+\beta+\gamma=7, \alpha\beta+\beta\gamma+\gamma\alpha=12,\alpha\beta\gamma=11$. From this how I can proceed. please give some idea

Let $z_i = \alpha^i + \beta^i + \gamma^i$
It's easy to check that $z_0 = 3, z_1 = 7, z_2 = 25$ etc.
Our objective is to compute $z_{21007} \bmod 10000$
Consider the sequence of rational integers $3, 7, 25, \ldots$
and the corresponding recurrence relation $$z_{n+3} - 7z_{n+2} + 12z_{n+1} - 11z_n = 0$$
We'll find the periodicity of the above sequence modulo $10000 = 2^4 5^4$
We'll do it in $3$ steps and need $3$ theorems (viz., Theorems $2, 8, 10$) from On sequences defined by linear recurrence relations  by H. T. Engstrom
$1.$ Find the periodicity modulo $2$ and modulo $5$ (See Theorem $2$)
Consider $$F(z) = z^3 - 7z^2 + 12z - 11 = 0$$
Or, $$F(z) \bmod 2 = (z^3 + z^2 + 1) \bmod 2$$
and  $$F(z) \bmod 5 = (z^3 + 3z^2 + 2z + 4) \bmod 5 = (z+4)(z^2+4z+1) \bmod 5$$
The period of the sequence modulo $2$ is $2^3-1 = 7$
and the period of the sequence modulo $5$ is $LCM(5^1-1, 5^2-1) = 24$
$2.$ Find the periodicity modulo $2^4$ and modulo $5^4$ (See Theorem $8$)
The period of the sequence modulo $2^4$ is $2^{4-1}.7 = 56$
and the period of the sequence modulo $5^4$ is $5^{4-1}.24 = 3000$
$3.$ Find the periodicity modulo $2^4 5^4$ (See Theorem $10$)
Finally the period of the sequence modulo $2^4 5^4$ is $LCM(56, 3000) = 21000$
The final step is to observe that $$z_{21007} \bmod 10000 = z_{21007 \bmod 21000} \bmod 10000 = z_7 \bmod 10000 = 4637$$
