An eight-digit integer is formed by repeating a positive four-digit integer. For example, 25,632,563 or 60,786,078 are integers of this form. What is the greatest common divisor of all eight-digit integers of this form?
Note that we can write
a(10)^7 + b(10)^6 + c (10)^5 + d (10)^4 + a(10)^3 + b(10^2) + c(10) + d =
a (10^7 + 10^3) + b(10^6 + 10^2) + c(10^5 + 10) + d(10^4 + 1) =
a ( 10^3) (10^4 + 1) + b (10^2) (10^4 +1) + c(10)(10^4 + 1) + d (10^4 + 1) =
(10^4 + 1) [ a (10^3 ) + b (10^2) + c (10) + d ]
The gcd = ( 10^4 + 1 ) = 10001