MathDB
Distance of integers

Source: Baltic Way 2015

November 8, 2015
number theory

Problem Statement

For any integer n2n \ge2, we define An A_n to be the number of positive integers m m with the following property: the distance from nn to the nearest multiple of mm is equal to the distance from n3n^3 to the nearest multiple of m m. Find all integers n2n \ge 2 for which An A_n is odd. (Note: The distance between two integers a a and bb is defined as ab|a -b|.)