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 end with 1000 and have atleast elements?
$An=a+(n-1)d$
$1000=1+(n-1)d$
$999=(n-1)d$
How to find the number of arithmetic progression that have atleast 3 elements?
$(n-1)d=999$
$d$ must be a divisor of $999$ so it may be one of the set
$D=\{1, 3, 9, 27, 37, 111, 333, 999\}$
with the first $7$ you have at least $3$ elements
for instance if $d=333$ the sequence is $1,\;334,\;667,\;1000$
with $d=999$ it doesn't work.
So the answer is $7$
Hope it helps