Is it possible to find all arithmetic progressions that exist in a set of three integers?

98 Views Asked by At

Is it possible to find all arithmetic progressions that exist in a set of say 3 integers. I know that the simplest arithmetic progression would be $$ a_n = a_1 + (n-1)d\:\text{ with }\:d = 1. $$ This progression does exist always in between any $3$ integers. But I can imagine that other arithmetic progressions may also possible. I also know how to calculate $d$ and $a_1$ when two values are given with their corresponding term number. This can be solved by an equation system. Here is an example:

Suppose we have $a_3 = -3$ and $a_8 = 22$: then, since $$ \begin{split} a_3 &= a_1 + 2d = -3 ;\\ a_8 &= a_1 + 7d = 22\\ \end{split} \implies \begin{split} 5d &= 25,\\ d &= 5 ,\\ a_1 &= -13\\ \end{split} $$ But I look for a calculation that does not need the definition of how many times $d$ is in between.

Assume, we only have the values $-13$, $-3$ and $22$. Which different arithmetic progressions come into question that have these three members? There should be several possibilities and I need them all ;)

2

There are 2 best solutions below

0
On

I assume that all terms must be integers.

If the numbers are $a$, $b$, and $c$ in increasing order (without loss of generality), let $d = \gcd(b-a, c-b)$. Then the number of different arithmetical series that contain all three numbers is equal to the number of (positive) factors of $d$, including $1$ and $d$ itself.

For the example you give, where $a = -13, b = -3, c = 22$, we have $d = \gcd(10, 25) = 5$. So there are two series, with constant differences $1$ and $5$, respectively.


If this is unclear, consider that the constant difference in the series must divide $b-a$ (otherwise, there would not be a whole number of terms from $a$ to $b$). Likewise for $c-b$. If this difference must divide $b-a$ and $c-b$, it must divide their greatest common divisor.

0
On

Given three numbers $x_1,x_2, x_3$, you want an arithmetic progression $a(n) = a_0 + d n$ such that for some nonnegative integers $n_i$ we have $$ \eqalign{a_0 + d n_1 &= x_1\cr a_0 + d n_2 &= x_2\cr a_0 + d n_3 &= x_3\cr}$$ We can eliminate $a_0$ by taking differences of these: $$ \eqalign{d (n_1 - n_2) &= x_1 - x_2\cr d (n_2 - n_3) &= x_2 - x_3\cr}$$ And then divide to get $$ \dfrac{n_1 - n_2}{n_2 - n_3} = \frac{x_1 - x_2}{x_2 - x_3}$$ So $(x_1 - x_2)/(x_2 - x_3)$ must be a nonzero rational number. Let's assume $x_1 > x_2 > x_3$ (if not, then re-order). If we write $(x_1-x_2)/(x_2-x_3)$ as $r/s$ for positive integers $r$ and $s$ (not necessarily in lowest terms), then for any nonnegative integer $n_3$ we can take $n_2 = s + n_3$, $n_1 = r + n_2$, $d = (x_1 - x_2)/(n_1 - n_2)$ and $a_0 = x_1 - d n_1$.