Consider the set S = {1, 2, 3, …., 1000}. How many arithmetic progressions can be formed from the elements of S that start with 1 and with 1000 and have at least 3 elements?
Choose the correct choice from the following options.
A) 3 B) 4 C) 5 D) 6 E) 7
Explanation :   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.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 the question). If we have n-1 = 999, n = 1000. d = 1. This is possible. So, we have totally, 7 possible combinations.   Answer : 6
<result>D</result>
Consider the set S = {1, 2, 3, …., 1000}. How many arithmetic progressions can be formed from the elements of S that start with 1 and with 1000 and have at least 3 elements?