1
$\begingroup$

How many possible arithmetic progressions of length $k$ exist where all elements are in the set $\left\{1,2,\dots,n\right\}$? We can assume the step of the progression to be a natural number.

Example: For $k=3$, $n=5$ we have four progressions: $(1,2,3), (2,3,4), (3,4,5), (1,3,5)$.


Additional (related) question: For a fixed $k$-element progression $A = (\alpha_1,\alpha_2, \dots, \alpha_k)$, what is the highest possible number of different $k$-element progressions that contain the element $\alpha_i$, where $1\leq i \leq k$?

Example: For $k=3$, $n=5$ we can see that the element $3$ appears in every progression, so the highest possible number of progressions is $4$.

1 Answers 1

1

Let $j$ be the least element of one of these progressions. Then $1\le j\le n-k+1$. If $d$ is the difference of the progression, then $j+(k-1)d\le n$, so $$1\le d\le \frac{n-j}{k-1}$$ Since $d$ must be an integer, there are $$\left\lfloor\frac{n-j}{k-1}\right\rfloor$$ possible values for $d$. This makes the same number of arithmetic progressions that begin with $j$.

So the total number of progressions is $$S=\sum_{j=1}^{n-k+1}\left\lfloor\frac{n-j}{k-1}\right\rfloor=\sum_{j=k-1}^{n-1}\left\lfloor\frac{j}{k-1}\right\rfloor=\sum_{j=1}^{n-1}\left\lfloor\frac{j}{k-1}\right\rfloor$$

If the Euclidean division $(n-1)/(k-1)$ gives $n-1=q(k-1)+r$ then this sum consists on some zeros, $k-1$ times $1,\ldots,k-1$ times $q-1$, and finally $r+1$ times $q$. Note that if $r=0$ then the term $q$ occurs only once at the very end.

Thus, $$S=\frac{(k-1)q(q-1)}2+q(r+1)$$

  • 0
    Perfect! P.S. I added an additional question to the original one.2017-01-18
  • 0
    Use a similar reasoning2017-01-18
  • 0
    So there are maximum $\frac{n-1}{k-1}$ possible values of $d$. If we assume that the element $\alpha_i$ can be in any of the $k$ positions in the progression, we get $m = k\,\frac{n-1}{k-1}$ maximum possible progressions. But this doesn't seem right, am I making a mistake?2017-01-18