MathLabs

Problem 1

Given any set A={a1,a2,a3,a4}A=\{a_1,a_2,a_3,a_4\} of four distinct positive integers, we denote the sum a1+a2+a3+a4a_1+a_2+a_3+a_4 by sAs_A. Let nAn_A denote the number of pairs (i,j)(i,j) with 1≤i<j≤41\le i<j\le4 for which ai+aja_i+a_j divides sAs_A. Find all sets AA of four distinct positive integers which achieve the largest possible value of nAn_A.
Step 4 of 5: Pin down n and m
In plain words

Positivity of a1 turns into a size restriction on n and m, which together with n<m leaves only two possibilities.

2a1=(a1+a3)+(a1+a2)−(a2+a3)=sA(1n+1m−12)2a_1=(a_1+a_3)+(a_1+a_2)-(a_2+a_3)=s_A\left(\dfrac1n+\dfrac1m-\dfrac12\right)
Detailed analysis

Combining the three equations gives 2a1=(a1+a3)+(a1+a2)−(a2+a3)=sA(1n+1m−12)2a_1=(a_1+a_3)+(a_1+a_2)-(a_2+a_3)=s_A\left(\dfrac1n+\dfrac1m-\dfrac12\right). Since a1>0a_1>0, this forces 1n+1m>12\dfrac1n+\dfrac1m>\dfrac12. If n≥4n\ge4 then 1n≤14\dfrac1n\le\dfrac14, which would force 1/m>1/41/m>1/4, i.e. m<4≤nm<4\le n, contradicting m>nm>n; hence n=3n=3. Then 1m>12−13=16\dfrac1m>\dfrac12-\dfrac13=\dfrac16 gives m<6m<6, and together with m>n=3m>n=3 this leaves m∈{4,5}m\in\{4,5\}.