Let k≥1 and A≥0 be fixed integers, let fA(t):=1t<1(1−t)A, and define
MfA(n;R):=∑d∣nμ(d)fA(logRlogd).
Then there is a constant ck,A>0 such that, for x≥R2klogR,
x1∑n≤xMfA(n;R)2k=ck,A(logR)Ek,A+O((logR)Ek,A−1),
where
Ek,A:=max{(k2k)−2k(A+1),−1}.
In particular, Ek=Ek,0=(k2k)−2k. Additionally, there is a constant ck′>0 such that, for R2k≤x,
x1∑n≤x(∑d∣nR/2<d≤Rμ(d))2k=ck′(logR)(k2k)−2k+O((logR)(k2k)−2k−1).
All implied constants depend at most on k and A.