How to compute $\gcd(d^{\large 671}\! +\! 1, d^{\large 610}\! −\!1),\ d = \gcd(51^{\large 610}\! +\! 1, 51^{\large 671}\! −\!1)$ Let $(a,b)$ denote the greatest common divisor of $a$ and $b$.
With  $ \ d = (51^{\large 610}\! + 1,\, 51^{\large 671}\! −1)$
and $\ \ x \,=\, (d^{\large 671} + 1,\, \ d^{\large 610} −1 )$
find $\ X = (x\bmod 10)$
I used $y=51^{61}$ to reduce $d$ to  $d=(y^{10}+1,y^{11}-1) = (y^{10}+1,y+1)$. 
What should I do now? 

First note: $\gcd(a^m \pm 1, a+1)=\gcd((a^{m}\pm 1)-(a^{m}+a^{m-1}),a+1) = \gcd(a^{m-1}\mp 1, a+1)$
And via induction $\gcd(a^{m}+1, a+1) = \gcd(2, a+1)$ if $m$ is even.  $\gcd(a^{m} - 1,a+1) =\gcd(0, a+1) = a+1$ if $m$ is even.  (And the opposite results if $m$ is odd).
so if we let $a= 51^{61}$.
Then $\gcd(51^{610} + 1, 51^{671} - 1)=$
$\gcd(a^{11}-1,a^{10} + 1)=$
$\gcd((a^{11} -1)-(a^{11} + a), a^{10} + 1) =$
$\gcd(a^{10} + 1, a+ 1) =  2$
...
Let $b = 2^{61}$ and so
$\gcd(2^{671}+1, 2^{610} -1)= \gcd (b^{11} + 1, b^{10} -1)=$
$\gcd((b^{11}+1)-(b^{11}-b), b^{10}-1)=\gcd(b^{10}-1,b+1)=b+1= 2^{61}+1$
