Find largest dividing integer within range Is there a neat way to find the largest integer that divides another integer fully, within a range. As an example, I would like to find the largest integer smaller than 1131 that divides 3500 completely. 
So far I have just tried by breaking up 3500 into its prime components and guessing, coming to 875, but is there a more structured way?
EDIT: I guess the problem is somewhat equivalent to get all dividing integers, and then just pick the largest within my range?

There is a randomized reduction from SUBSET-SUM to this problem, and it is NP-complete assuming a weak version of Cramér's conjecture.  So there is no neat general solution, but of course there are many special cases that can be determined quickly (for example if the suspected multiple is prime we can test that in polynomial time and know that there is no divisor in the range, or if the range is small enough that the divisibility by each member can be tested individually).
