We know that it should be an AP, 1st element is 1, and last element 1000. a = 1, a + (n-1) d = 1000 ; (n-1) d = 999. So 999 is the product of (n-1) and d. So, we need to see the factors of 999 to see what all values/how many of those values (n-1) and d can assume. Prime factorize 999. The prime factors are 3, 3, 3, and 37. (999 = 3 * 3 * 3 * 37). (Other than 1 and 999)So, we can have(n - 1) = 3, d = (3 * 3 * 37)(n - 1) = 3 * 3, d = (3 * 37)(n - 1) = 3 * 3 * 3, d = (37)(n - 1) = 37, d = (3 * 3 * 3)(n - 1) = 37 * 3, d = (3 * 3)(n - 1) = 37 * 3 * 3, d = (3)
Other than this, we can have 1 and 999 also as factors of 999.If we have n-1 as 1, n is 2. But that means only 2 terms in AP. (Not possible according to question)If we have n-1 = 999, n = 1000. d = 1. This is possible.So, we have totally, 7 possible combinations.
2nd approach:
The factors of 999 are 1,3,9,27,37,111,333,999. We can assign each of these values to d or (n-1), and find the other one correspondingly and proceed. Again in this case, (n-1) cannot be 1. All other cases are possible. Both the approaches are essentially the same. Just that you need not spend time multiplying the factors in the 1st approach.