Proof: We first prove a lemma.
Lemma: For integers m≥2, s≥1, and a sequence 1=x1<⋯<xs where every sum ∑1≤j≤mxij (1≤i1≤⋯≤im≤s) is square-free, there exists an integer x>xs such that:
* x is coprime with each xi (1≤i≤s)
* Every sum (m−t)x+∑1≤j≤txij (0≤t≤m−1, 1≤i1≤⋯≤it≤s) is square-free
Proof of Lemma: Take B>1 such that:
cB:=p<B∏(1−p1)−1>m⋅2m+s.
Let
dB=p≤B∏p,M0=1≤k≤2m+sxs∏k,M=dBM0.
Consider x=yM2+x1 (1≤y≤M2). Clearly, x is coprime with each xi (1≤i≤s).
Note that
(m−t)x+1≤j≤t∑xij≤mx≤m(M4+1)<(mM2)2.
If q2∣(m−t)x+∑1≤j≤txij, then q<mM2.
If q∤M, clearly (m−t)x+∑1≤j≤txij is not divisible by q2. For primes q<mM2 with q∤M (so q>2m+sxs), let Xq be the set of integers 1≤y≤M2 where some sum (m−t)x+∑1≤j≤txij is divisible by q2.
The number of possible index sets is at most 2s+m−2, so
∣Xq∣≤2m+s−2(q2M2+1).
For 2m+sxs<q≤M:
∣Xq∣≤2m+s−1q2M2;
---
For M<q≤mM2:
∣Xq∣≤2m+s−1.
Thus,
∣⋃Xq∣≤2m+s−1M2q>2m+sxs∑q21+2m+s−1(π(mM2)−π(M))≤2m+sxs2m+s−1M2+cBm⋅2m+s−1M2<M2.
Since we have used dB∣M, it follows that
π(mM2)−π(M)≤(mM2−M)p≤B∏(1−p1)<cB−1mM2.
Now choose an integer y such that 1≤y≤M and
y∈/q<mM2q∤M⋃Xq,
then x=yM2+x1 will satisfy the requirements.
Now the main proof. If m has a square factor p2, by pigeonhole principle there exist m elements ai1,…,aim with ai1≡⋯≡aim(modp2), making their sum divisible by p2.
If m is square-free, construct A={ai} inductively starting with a1=1. By the lemma, we can find pairwise coprime integers 1=a1<a2<… where all m-term sums are square-free. Then all m-term products are also square-free since the ai are pairwise coprime. □