Problem

Source: 2024 IRN-SGP-TWN Friendly Math Competition P2

Tags: number theory, divisor function



Let $d(n)$ denote the number of positive divisors of $n$. For any given integer $a \geq 3$, define a sequence $\{a_i\}_{i=0}^\infty$ satisfying $a_{0}=a$, and $a_{n+1}=a_{n}+(-1)^{n} d(a_{n})$ for each integer $n \geq 0$. For example, if $a=275$, the sequence would be \[275, \overline{281,279,285,277,279,273}.\] Prove that for each positive integer $k$ there exists a positive integer $N$ such that if such a sequence has period $2k$ and all terms of the sequence are greater than $N$ then all terms of the sequence have the same parity. Proposed by Navid