GCD of successive terms

70 Views Asked by At

I was solving this question, and I'm hitting a wall.

$a_n=20+n^2\;\;\forall n\in\Bbb N,\quad d_n=\gcd(a_n,a_{n+1})$. Find with proof all values taken by $d_n$, and show by example when these values are achieved.

Here is my progress:

$\begin{align}d_n&=\gcd(a_n,a_{n+1})\\&=\gcd{(n^2+20,n^2+2n+21)}\\&=\gcd(n^2+20,2n+1)\\\end{align}$

I hesitate to multiply $2n+1$ by $n$, as if $n|20$ then it would increase the $\gcd$ by a factor of $n$.

How do I go further? Can anyone help me?

2

There are 2 best solutions below

3
On

If $d=(a_n,a_{n+1})$

$d$ must divide $$a_{n+1}-a_n=2n+1$$

$d$ must divide $$2(20+n^2)-n(2n+1)=40-n$$

$d$ must divide $$2n+1+2(40-n)=81$$

0
On

The extended Euclidean algorithm gives $$ 81= (2 n + 3)a_n+(1 - 2 n)a_{n+1} $$ and so $d_n$ divides $81$. All divisors actually occur: $$ d_0=1, \quad d_1=3, \quad d_4=9, \quad d_{13}=27, \quad d_{40}=81 $$ Here are the values of $d_n$ for $n=0,\dots,40$: $$ 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 81 $$