Let Sm=a1m+a2m+⋯+anm, and suppose ai=tiri,ri,ti∈Z,ti>0, and (ri,ti)=1,i=1,2,⋯,n.
If a1,a2,⋯,an are not all integers, then there must be a ti>1. Let p be a prime factor of t1t2⋯tn, and let ei be the largest non-negative integer such that pii∣ti. Without loss of generality, assume
e1=e2=⋯=ej>ej+1⩾⋯⩾en
Let M=[t1,t2,⋯,tn], then we can set
M=pe1⋅N
where N∈N∗, and p∤N. Now, since Sm∈Z, it follows that
Tm=(a1pe1N)m+(a2pe1N)m+⋯+(anpe1N)m
is a multiple of pmw1.
Let m=pj−pj−1(=φ(pj)), and consider the terms in Tm.
For 1⩽r⩽j, by Euler's theorem (note that p∤arpe1N),
(arpe1N)m≡(arpe1N)q(pj)≡1(modpj)
While for r>j, p∣arpe1N. Given that for p⩾2,j⩾1,
m=pj−pj−1⩾j
it follows that
(arpe1N)m≡0(modpj)
The above discussion shows that
Tm=r=1∑n(arpe1N)m≡j(modpj)
However, j<pj, so pj∤Tm. Consequently, Tm is not a multiple of pmϵ1. This is a contradiction.
Therefore, a1,a2,⋯,an are all integers.