Maths Olympiad Prep

Library / /284 of 520

Number theory Difficulty 6.5 National olympiad Find the answer

Let KK and N>KN>K be fixed positive integers. Let nn be a positive integer and let a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} be distinct integers. Suppose that whenever m1,m2,,mnm_{1}, m_{2}, \ldots, m_{n} are integers, not all equal to 0, such that miK\left|m_{i}\right| \leqslant K for each ii, then the sum

i=1nmiai \sum_{i=1}^{n} m_{i} a_{i}

is not divisible by NN. What is the largest possible value of nn?

## Proposed by North Macedonia

A number or a short expression. Spacing and $ signs are ignored.

Solution

The answer is n=logK+1Nn=\left\lfloor\log _{K+1} N\right\rfloor.
Note first that for nlogK+1Nn \leqslant\left\lfloor\log _{K+1} N\right\rfloor, taking ai=(K+1)i1a_{i}=(K+1)^{i-1} works. Indeed let rr be maximal such that mr0m_{r} \neq 0. Then on the one hand we have

i=1nmiaii=1nK(K+1)i1=(K+1)n1 \left|\sum_{i=1}^{n} m_{i} a_{i}\right| \leqslant \sum_{i=1}^{n} K(K+1)^{i-1}=(K+1)^{n}-1

So the sum is indeed not divisible by NN.
Assume now that nlogK+1Nn \geqslant\left\lfloor\log _{K+1} N\right\rfloor and look at all nn-tuples of the form (t1,,tn)\left(t_{1}, \ldots, t_{n}\right) where each tit_{i} is a non-negative integer with tiKt_{i} \leqslant K. There are (K+1)n>N(K+1)^{n}>N such tuples so there are two of them, say (t1,,tn)\left(t_{1}, \ldots, t_{n}\right) and (t1,,tn)\left(t_{1}^{\prime}, \ldots, t_{n}^{\prime}\right) such that

i=1ntiaii=1ntiaimodN \sum_{i=1}^{n} t_{i} a_{i} \equiv \sum_{i=1}^{n} t_{i}^{\prime} a_{i} \bmod N

Now taking mi=titim_{i}=t_{i}-t_{i}^{\prime} for each ii satisfies the requirements on the mim_{i} 's but NN divides the sum

i=1nmiai \sum_{i=1}^{n} m_{i} a_{i}

a contradiction.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.