If $a_1=a_2=a_3=1$ then if $n>3$ show that $2^{\gcd(a_{n-2},a_{n-3})}+a_{n-1}=2n-5.$

algebra-precalculuselementary-number-theorysequences-and-series

Question: I write $a_1=a_2=a_3=1$ and set $a_n=2^{\gcd(a_{n-2},a_{n-3})}+a_{n-1}.$ For $n>3$ is it true and how
can I show that $a_n=2n-5$ ? In particular I would like to show that that the sequence $\{a_n\}_{n=1}^\infty$ is the sequence $1,1,1,3,5,7,9,11,13,15,\ldots$

For example if $n=7$ then $a_7=2^{\gcd(a_5,a_4)}+a_6=2^{\gcd(3,5)}+2=2^1+7=9.$ And $2*7-5=14-5=9.$

Best Answer

We show that $$\gcd(a_n,a_{n-1})=1$$first notice that all the terms of the sequence are odd (because $2^{\gcd(a,b)}$ is always even and $a_1$ and $a_2$ are odd and non-zero) therefore $$\gcd(a_n,a_{n-1})=\gcd(2^{\gcd(a_{n-2},a_{n-3})}+a_{n-1},a_{n-1})=\gcd(2^{\gcd(a_{n-2},a_{n-3})},a_{n-1})=1$$since $2^{\gcd(a_{n-2},a_{n-3})}$ is a power of $2$ and has no odd component. Therefore $\gcd(a_n,a_{n-1})=1$ which leads to $$a_n=2+a_{n-1}$$or $$a_n=2n-5$$

Related Question