Proof. Assume f(X)=λ≥an2. By contradiction, suppose ∣X∣>λM. Since λ is of the form aik (k∈Z>0), λM is an integer. We prove that there exists x∈X such that f(X∖{x})=f(X), which contradicts the minimality of X.
For 1≤i≤n, let Xi={x∈X∣ai∤x}.
Consider all indices i satisfying ∣Xi∣≤⌈λai⌉, and denote these indices by i1<i2<⋯<im. If
Xi1∪Xi2∪⋯∪Xim=X,(∗)
take x∈X∖(Xi1∪Xi2∪⋯∪Xim), and let Y=X∖{x}. Then, f(Y)=f(X).
This is because, letting Yi={y∈Y∣ai∤y}, we have: If i∈{i1,i2,…,im}, then Xi=Yi, and
y∈Y∑{aiy}=y∈Yi∑{aiy}=x∈Xi∑{aix}=x∈X∑{aix}≥λ.
If i∈/{i1,i2,…,im}, then ∣Yi∣≥∣Xi∣−1≥⌈λai⌉, so
y∈Y∑{aiy}=y∈Yi∑{aiy}≥∣Yi∣⋅ai1≥⌈λai⌉⋅ai1≥λ.
Thus, f(Y)≥λ. Clearly, f(Y)≤f(X)=λ, so f(Y)=f(X).
Now, we prove (*) holds. For 1≤j≤m, let Tj=Xi1∪⋯∪Xij and Mj=lcm(ai1,…,aij). Clearly, ∣Tj∣=∣Xi1∣≤⌈λai1⌉=⌈λM1⌉.
For 2≤j≤m, we have ∣Tj∖Tj−1∣≤⌈λMj⌉−⌈λMj−1⌉. Indeed, if Mj=Mj−1, then
Tj={x∈X∣Mj∤x}={x∈X∣Mj−1∤x}=Tj−1,
so ∣Tj∖Tj−1∣=0=⌈λMj⌉−⌈λMj−1⌉. If Mj>Mj−1, then aij∤Mj−1, and let d=gcd(aij,Mj−1), Mj−1=du, aij=dv, so u and v are coprime, with u>v>1, and Mj=duv.
∣Tj∖Tj−1∣≤∣Xij∣≤⌈λaij⌉≤⌈λMj⌉−⌈λMj−1⌉.(∗∗)
The last inequality in (∗∗) requires λaij≤λMj−λMj−1−1⇔λd(uv−u−v)≥1. Since λ≥an2≥aij2=dv2, it suffices to show v2(uv−u−v)≥1⇔(2u−3)(v−1)≥3. Given u>v>1, this inequality holds, so (∗∗) holds. Therefore,
∣Tm∣=∣T1∣+j=2∑m∣Tj∖Tj−1∣≤⌈λM1⌉+j=2∑m(⌈λMj⌉−⌈λMj−1⌉)=⌈λMm⌉≤⌈λM⌉=λM.
This proves (*), so the assumption by contradiction fails, and the original proposition is proved.