# Finding GCD of all permutations of a decimal number [duplicate]

Possible Duplicate:
Computing GCD of all permutations (of the digits) of a given number.

How can we find the greatest common divisor (GCD) of all numbers that can be obtained by permuting the digits in the given number?

Please suggest a feasible algorithm.

-

## marked as duplicate by Ross Millikan, Arturo Magidin, Akhil MathewMar 18 '11 at 13:49

Possible duplicate:math.stackexchange.com/questions/8943/… –  VelvetThunder Feb 20 '11 at 12:50

Maybe you can view numbers as values of polynomials at 10 with coefficients in the residue class ring $Z/(10)$, sorry for being unclear before. –  awllower Feb 16 '11 at 13:26