Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How many different arithmetic progressions with integral terms can be formed with first term $a$, last term $b$, and at least $n$ terms?

$a \lt b$, and $a,b,n \in \mathbb{N}$ and they are always chosen in a manner which gives a valid answer.

How to solve this one? Please do explain your answer.

share|improve this question

1 Answer 1

If an arithmetic progression starts with $a$ and ends with $b$, and has $k$ terms, then we must be able to write $b = a+(k-1)t$ for some $t\gt 0$ (and integer, given the conditions).

That means that $b-a$ must be a multiple of $k-1$. Conversely, if $b-a$ is a multiple of $k-1$, $b-a = (k-1)t$, then the arithmetic progression $$a, a+t, a+2t,\ldots,a+(k-1)t = b$$ starts with $a$, ends with $b$, and has exactly $k$ terms.

So the number of arithmetic progressions that start with $a$ and end with $b$ and have at least $n$ terms is equal to the number of integer divisors of $b-a$ that are greater than $n-1$.

Can we count those more easily instead? In other words, given a number $K$, can we count how many divisors greater than a given $N$ it has?

share|improve this answer
:Thanks for your answer.I could comment on it (probably due to my network which is currently not allowing the concerned script). I know how to compute the number of divisors of K from the prime factorization, but I don't know how to do that with the additional constraints of " greater than a given $N$ ". Please help. –  user18844 Nov 3 '11 at 20:39
The number will depend on $N$ and the prime factors of $K$. Every divisor greater than $N$ is "paired off" with a divisor smaller than $K/N$, which may be easier to work with. It would be simple to do with particular $K$ and $N$, but I doubt you can find some nice closed formula (even in terms of the factorization of $K$, you would need to break it up into cases depending how the prime factors grow and their exponents). –  Arturo Magidin Nov 3 '11 at 20:45
I don't know any way besides listing the factors and checking. But once you have the factorization that is not hard. For example, if you have $12=2^23^1$, you know it has $(2+1)(1+1)=6$ factors. To list them, they are of the form something from $\{1,2,4\}$ times something from $\{1,3\}$ –  Ross Millikan Nov 3 '11 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.