The four consecutive digits a, b, c and d are used to form the four-digit numbers abcd and dcba. What is the greatest common divisor of all numbers of the form abcd+dcba?
1234 + 4321 = 5555
2345 + 5432 = 7777
3456 + 6543 = 9999
4567 + 7654 = 12221
5678 + 8765 = 14443
6789 + 9876 = 16665
And....
5555 | _=_ | 101 * 11 | * 5 |
7777 | = | 101 * 11 | * 7 |
9999 | = | 101 * 11 | * 3 * 3 |
12221 | = | 101 * 11 | * 11 |
14443 | = | 101 * 11 | * 13 |
16665 | = | 101 * 11 | * 3 * 5 |
gcd(5555, 7777, 9999, 12221, 14443, 16665) = 101 * 11 = 1111
The greatest GCD of abcd and dcba is when they total 9999 when added together. So:
3456 and 6543 have a GCD of 9.
1234 + 4321 = 5555
2345 + 5432 = 7777
3456 + 6543 = 9999
4567 + 7654 = 12221
5678 + 8765 = 14443
6789 + 9876 = 16665
And....
5555 | _=_ | 101 * 11 | * 5 |
7777 | = | 101 * 11 | * 7 |
9999 | = | 101 * 11 | * 3 * 3 |
12221 | = | 101 * 11 | * 11 |
14443 | = | 101 * 11 | * 13 |
16665 | = | 101 * 11 | * 3 * 5 |
gcd(5555, 7777, 9999, 12221, 14443, 16665) = 101 * 11 = 1111