MathLabs

Problem 5

A deck of n>1n>1 cards is given. A positive integer is written on each card. The deck has the property that the arithmetic mean of the numbers on each pair of cards is also the geometric mean of the numbers on some collection of one or more cards. For which nn does it follow that the numbers on the cards are all equal?
Step 5 of 8: Choose the largest card avoiding p
In plain words

The gcd condition guarantees an available card.

ak=max⁡{ai:p∤ai},ak<Ma_k=\max\{a_i:p\nmid a_i\},\qquad a_k<M
Detailed analysis

Because the gcd is 11, at least one card is not divisible by pp, so aka_k exists. Since MM is divisible by pp, ak<Ma_k<M.