If k,m≥2 and N≥1, let C(k,N) (resp. C(k,Z/MZ)) denote the size of the largest subset of 1,…,N that does not contain any two elements that differ by a perfect kth power. Establish upper and lower bounds for C(k,N) and C(k,Z/MZ) that are as strong as possible.