MathDB
Infinite in the Sequence of Remainder

Source: KJMO 2022 P3

October 29, 2022
number theoryprime numbers

Problem Statement

For a given odd prime number pp, define f(n)f(n) the remainder of dd divided by pp, where dd is the biggest divisor of nn which is not a multiple of pp. For example when p=5p=5, f(6)=1,f(35)=2,f(75)=3f(6)=1, f(35)=2, f(75)=3. Define the sequence a1,a2,,an,a_1, a_2, \ldots, a_n, \ldots of integers as the followings:
[*]a1=1a_1=1 [*]an+1=an+(1)f(n)+1a_{n+1}=a_n+(-1)^{f(n)+1} for all positive integers nn.
Determine all integers mm, such that there exist infinitely many positive integers kk such that m=akm=a_k.