MathDB
Problems
Contests
International Contests
Baltic Way
2015 Baltic Way
20
20
Part of
2015 Baltic Way
Problems
(1)
Distance of integers
Source: Baltic Way 2015
11/8/2015
For any integer
n
≥
2
n \ge2
n
≥
2
, we define
A
n
A_n
A
n
to be the number of positive integers
m
m
m
with the following property: the distance from
n
n
n
to the nearest multiple of
m
m
m
is equal to the distance from
n
3
n^3
n
3
to the nearest multiple of
m
m
m
. Find all integers
n
≥
2
n \ge 2
n
≥
2
for which
A
n
A_n
A
n
is odd. (Note: The distance between two integers
a
a
a
and
b
b
b
is defined as
∣
a
−
b
∣
|a -b|
∣
a
−
b
∣
.)
number theory