I\'m not looking for a solution, just something to nudge me in the right direction. I\'m not sure how to proceed - I\'ve been trying to work it out for the past few hours but I have not made any progress. I know I should have to make use of gcd / Euclid\'s algorithm. From Introduction to Mathematical Thinking (Gilbert & Vanstone), pg.50, exercise 98 If a and b are odd positive integers, and the sum of the integers, less than a and greater than b , is 1000, then find a and b. Many thanks. Solution The average of the integers between a and b is (a+b)/2 and there are a-b-1 of them, so the sum of the integers between a and b is equal to (a+b)(a-b-1)/2. Therefore, (a+b)(a-b-1)/2 = 1000, or (a+b)(a-b-1) = 2000. Knowing that a and b are odd means that a+b must be even, and a-b-1 must be odd. Hopefully from there you should be able to solve it. (I don\'t see how you would use GCD or the Euclidean Algorithm to do this, however.) .