MathDB
Sequence formed by alternately adding and subtracting d(n)

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

August 2, 2024
number theorydivisor function

Problem Statement

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