This is a variation of the final countdown question (as reported at [url]http://learninglab.wbur.org/2015/05/08/national-math-competition-comes-to-boston/[/url]) in the 2015 National MATHCOUNTS ([url]http://www.mathcounts.org[/url]) competition.
This isn't much different from the handshake problem ([url]http://tube.geogebra.org/student/b138355#material/142499[/url]). If there are n terms, then there are n*(n-1) places in the arithmetic progression that the two given numbers could go. The requirement that the terms be increasing (or it could be decreasing), means only half of these options will work.