0

Suppose there are 2 APs, AP1 and AP2 where the first terms are a1 and a2 respectively and the common difference is d1 and d2. How do you find a mathematical formula to define the AP of the common terms, i.e. their first term and the common difference, without doing random guessing

let's suppose the first term is A.P’s 3,7,11,... and the second 2,9,16,...

I know the common difference of the AP of common terms is d=LCM(d1,d2) = LCM(4,7)=28 but what about the first term.

Since the common term must have the value and are defined by their own respective APs equation

a1+(n1-1)d1= a2+(n2-1)d2

and so

3+(n1-1)4= 2+(n2-1)7

4n1-4=7n2

4(n1-1)=7n2

Now what? One thing I did was find the first n1 value divisible by 7(cause it's on the other side, LHS) and the first n2 value divisible by 4 (cause it's on the other side, the RHS). And it seems to work for me, but what if I couldn't take 4 out of the bracket like this time.

Is there are better way?

I think I need to go to Fundamental theorem of Arithmetics because I vaguely remember doing something like this

JMP
  • 21,771
Adil Mohammed
  • 360
  • 1
  • 17
  • Please use the basic tutorial and quick reference guide and the Meta Read and enhance your question – Jessie Feb 17 '21 at 11:05
  • This is just a rewording of the problem that is solved by the Chinese Remainder Theorem (CRT). We have hundreds of posts on using CRT which are easily located by searching, e.g. the listed dupes. – Bill Dubuque Feb 17 '21 at 19:25
  • @BillDubuque Well i never heard of the Chinese Remainder Theorem, but i need to say even if it were using CRT, You can never deny that this is a new application of the theorem in Arithmetic Progression... isn't that a new perspective? – Adil Mohammed Feb 18 '21 at 08:22
  • No, it is one of the most common examples uses to illustrate CRT (for many centuries) – Bill Dubuque Feb 18 '21 at 08:24
  • Might as well as add I am a highschooler with a different school curriculum, maybe that's why I never heard of it (Or maybe I haven't been alive for centuries). But could you help me out finding a page with the same question rather than using simply the same formula? Only then it would be a true duplicate, right? – Adil Mohammed Feb 18 '21 at 08:57

2 Answers2

1

The two sequences are $\langle 4n-1 \rangle$ and $\langle 7m-5 \rangle$. We solve for their equal terms.

$$4n-1=7m-5$$ $$\Rightarrow m=\frac{4(n+1)}{7}=\text{natural number}$$

Smallest $m$ is when $7$ divides $n+1$ ie, (smallest) $n=6$ yielding $m=4$. Indeed $4\cdot 6 -1 =23 = 7\cdot 4 -5$

Further values of $n$ are incremented by $7$ and that of $m$ by $4$.

cosmo5
  • 10,629
1

Suppose you have one arithmetic progression $a+mc$ and another $b+nd$ where $a,b$ are the sequences' initial terms, $m,n$ are the indices of the sequences, and $c,d$ are the differences of the sequences respectively. To simplify notation, I will treat sequences as starting from index zero, but this is easily adjusted if you insist on sequences starting from index 1.

I assume that by "first term common to both" you do not require that their index be the same in each sequence, that you are instead simply looking for the smallest term which occurs in both sequences at some point but not necessarily at the same index.

Now... the terms which occur in the first progression are all $a$ more than some integer multiple of $c$. Written in terms of modular equivalences, that would be that if $x$ is some term in the first sequence we have that $x\equiv a\pmod{c}$. Similarly, if $x$ were also in the second sequence we would have $x\equiv b\pmod{d}$

So, our task is to solve the simultaneous set of equivalencies $\begin{cases}x\equiv a\pmod{c}\\x\equiv b\pmod{d}\end{cases}$ for the smallest $x$ which is greater than equal to both $a$ and $b$.

This is precisely the type of problem that the Chinese Remainder Theorem is meant to solve.

Note that it might not be possible to find a solution for certain $a,b,c,d$ in the case that $\gcd(c,d)>1$. For instance the arithmetic progressions $2m$ and $1+2n$ generate the even numbers and odd numbers respectively... there is no overlap.

In the case of $\gcd(c,d)=1$ we can via the Extended Euclidean Algorithm find the coefficients $j,k$ for Bézout's Identity satisfying $jc+kd=1$ which are guaranteed to exist.

Armed with this knowledge, letting $x\equiv bjc+akd\pmod{cd}$, we can see then that $x\equiv a\pmod{c}$ since $bjc+akd\equiv 0+akd\equiv ajc+akd\equiv a(jc+kd)\equiv a(1)\equiv a\pmod{c}$. Similarly, we see that this choice of $x$ satisfies $x\equiv b\pmod{d}$.

Now, all that remains is to find the smallest such $x$ which is simultaneously greater than or equal to $a$ and $b$.

Adjusting this to allow for $c,d$ which are not coprime follows similar principles but the value of $\gcd(c,d)$ appears in more calculations. Follow the link to see how it changes.


As for your specific example, we have the sequences $3+4m$ and $2+7n$.

We see that $\gcd(4,7)=1=2\cdot 4 + (-1)\cdot 7$

We see then that the numbers common to both are of the form $x\equiv 2\cdot 2\cdot 4 + 3\cdot (-1)\cdot 7\pmod{4\cdot 7}$, or simplifying $x\equiv 16 -21\equiv -5\equiv 23\pmod{28}$

That is to say, the numbers which are common to both sequences are $23,23+28,23+2\cdot 28, 23+3\cdot 28,23+4\cdot 28,\dots$ or otherwise written $23,51,79,107,\dots$

The smallest of which which is larger than both $a$ and $b$ (larger than $3$ and $2$) is $23$ itself.

JMoravitz
  • 79,518