# Understand the problem

[/et_pb_text][et_pb_text _builder_version="3.22.4" text_font="Raleway||||||||" background_color="#f4f4f4" box_shadow_style="preset2" custom_margin="10px||10px" custom_padding="10px|20px|10px|20px"]Find all pairs $(b,c)$ of positive integers, such that the sequence defined by $a_1=b$, $a_2=c$ and $a_{n+2}= \left| 3a_{n+1}-2a_n \right|$ for $n \geq 1$ has only finite number of composite terms.

[/et_pb_text][et_pb_tabs active_tab_background_color="#0c71c3" inactive_tab_background_color="#000000" _builder_version="3.22.4" tab_text_color="#ffffff" tab_font="||||||||" background_color="#ffffff"][et_pb_tab title="Hint 0" _builder_version="3.22.4"]Do you really need a hint? Try it first!

[/et_pb_tab][et_pb_tab title="Hint 1" _builder_version="3.23.3"]There exists a general theory of second-order linear difference equations. Read about it here.[/et_pb_tab][et_pb_tab title="Hint 2" _builder_version="3.23.3"]Can we have $a_n>a_{n+1}$ for all $n$? What happens if we do? What happens otherwise?

[/et_pb_tab][et_pb_tab title="Hint 3" _builder_version="3.23.3"]Note that if $a_n for some $n$ then the sequence becomes increasing thereafter. Use this fact to simplify the recurrence relation and solve it explicitly.

[/et_pb_tab][et_pb_tab title="Hint 4" _builder_version="3.23.3"]

The sequence cannot be decreasing because it is a sequence of positive integers. Hence there exists (a smallest) $k$ such that $a_k\le a_{k+1}$. If $a_k=a_{k+1}$ then the sequence becomes constant from the $k$th term onwards (we shall treat this case later). Otherwise $3a_{k+1}-2a_k>a_k$ hence $a_{k+2}>a_{k+1}$. This implies that the sequence becomes increasing from the $k$th term onwards. Also, $a_{n+2}=3a_{n+1}-2a_n$ for $n\ge k$. This difference equation has the characteristic equation $\lambda^2-3\lambda +2=0$ (see the link in hint 1) which has the solutions $\lambda = 2,1$. Thus, $a_{n+k}=2^nA+B$ for $A,B$ satisfying $A+B=a_k, 2A+B=a_{k+1}$. Take any prime divisor $p$ of $A+B$. By Fermat's little theorem, $2^{m(p-1)} \equiv 1 \; (\text{mod}\; p)$ for every positive integer $m$. Thus $2^{m(p-1)}A+B\equiv A+B\equiv 0\; (\text{mod}\; p)$. Hence the sequence contains infinitely many composites. This cannot be allowed, so the sequence cannot be strictly increasing at any point.

The above discussion shows that, for any permissible sequence, there exists a (smallest) $j$ and a prime $q$ such that $a_n=q$ for all $n\ge j$. For $n, the sequence is decreasing. Note that, either $q=a_{j+1}=3a_j-2a_{j-1}=3q-2a_{j-1}$ or $q =2a_{j-1}-3q$. Hence, either $a_{j-1}=q$ or $a_{j-1}=2q$. The first one can happen only if $j=1$ because otherwise the minimality of $j$ is violated. In that case, the sequence is constant and $b=c=q$. If $a_{j-1}=2q$ then either $j=2$ (in which case $b=2q, c=q$) or $q=|6q-2a_{j-2}|$ hence $a_{j-2}=3q\pm\frac{q}{2}$. The last equality forces $q$ to be 2. Thus $a_{j-2}=6\pm 1$. If $j>3$ then $4=a_{j-1}=|18\pm 3 - 2a_{j-3}|$ which is absurd as $2a_{j-3}$ cannot be an odd number. Hence $j=3$ in this case and $c=4,b=5,7$.

# Similar Problems

[/et_pb_text][et_pb_post_slider include_categories="9" _builder_version="3.22.4"][/et_pb_post_slider][et_pb_divider _builder_version="3.22.4" background_color="#0c71c3"][/et_pb_divider][/et_pb_column][/et_pb_row][/et_pb_section]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

### Cheenta. Passion for Mathematics

Advanced Mathematical Science. Taught by olympians, researchers and true masters of the subject.