Let $x,y$ and $a_0, a_1, a_2, \cdots $ be integers satisfying $a_0 = a_1 = 0$, and $$a_{n+2} = xa_{n+1}+ya_n+1$$for all integers $n \geq 0$. Let $p$ be any prime number. Show that $\gcd(a_p,a_{p+1})$ is either equal to $1$ or greater than $\sqrt{p}$.
Problem
Source: Swiss MO 2023/3
Tags: number theory, greatest common divisor
12.03.2023 15:16
Outline from Contest: Very standard idea, you can do similar things for Pisano period for Fibonacci, let $q$ be a prime. If $q$ is a divisor of $y$ then $q \nmid gcd(a_n,a_{n+1})$ for $n \geq 1$ is easy to see. If $gcd(q,y) = 1$, then take by pigeonhole some pair of pairs $(a_i,a_{i+1}) = (a_j,a_{j+1})$ in $\mathbb{F}_q^2$ and $i \neq j$, $i,j \leq q^2$, then notice that in $\mathbb{F}_q^2$ $$ya_{i-1} \equiv a_{i+1}-xa_i-1 = a_{j+1}-xa_j-1 = ya_{j-1}$$which means that $(a_{i-1},a_i) = (a_{j-1},a_j)$ in $\mathbb{F}_q^2$ as well, then take $(i,j)$ to be such that $i$ is minimal and notice that this forces $i = 0$ and take $j \leq q^2$ to be minimal such that $(0,0) = (a_j,a_{j+1})$, then it is easy to see that $j = q_i$ is the minimal period of this sequence, that is, $(0,0) = (a_p,a_{p+1})$ means that $q_i \mid p$, as $q_i \neq 1$, we get $q^2 \geq q_i = p$, then as $q^2 \neq p$, we get $q > \sqrt{p}$ for all prime divisors of $gcd(a_p,a_{p+1})$ which finishes. Remark: Problems are ordered by difficulty (mod 4), only $5$ of the problems were released due to confidentiality.
31.12.2023 01:05
We uploaded our solution https://calimath.org/pdf/SwissMO2023-3.pdf on youtube https://youtu.be/AzB3Q0aSshU.