We consider a system of NN spinless fermions, interacting with each other via a power-law interaction \epsilon/r^nϵ/rn, and trapped in an external harmonic potential V(r) = r^2/2V(r)=r2/2, in d=1,2,3d=1,2,3 dimensions. For any 0 < n < d+20<n<d+2, we obtain the ground-state energy E_NEN of the system perturbatively in \epsilonϵ, E_{N}=E_{N}^{≤ft(0)}+\epsilon E_{N}^{≤ft(1)}+O≤ft(\epsilon^{2})EN=EN≤ft(0)+ϵEN≤ft(1)+O≤ft(ϵ2). We calculate E_{N}^{≤ft(1)}EN≤ft(1) exactly, assuming that NN is such that the “outer shell” is filled. For the case of n=1n=1 (corresponding to a Coulomb interaction for d=3d=3), we extract the N \gg 1N≫1 behavior of E_{N}^{≤ft(1)}EN≤ft(1), focusing on the corrections to the exchange term with respect to the leading-order term that is predicted from the local density approximation applied to the Thomas-Fermi approximate density distribution. The leading correction contains a logarithmic divergence, and is of particular importance in the context of density functional theory. We also study the effect of the interactions on the fermions’ spatial density. Finally, we find that our result for E_{N}^{≤ft(1)}EN≤ft(1) significantly simplifies in the case where nn is even.