Let m=⌊log2n⌋, and split the set of integers 1 through n into m+1 pairwise disjoint subsets J0,J1,…,Jm, where Jk consists of all numbers of the form 2k(2ℓ+1), ℓ=0,…,⌊n/2k+1−1/2⌋.
If j is a member of Jk, then rj≥2k, unless j=2k in which case rj=0.
If k>⌊log23n⌋=m′, then Jk consists of 2k alone, so it contributes nothing to the sum in question.
Consequently,
k=1∑nrk=k=0∑m′j∈Jk∑rj≥k=0∑m′2k(∣Jk∣−1)=k=0∑m′2k⌊2k+1n−21⌋>k=0∑m′2k(2k+1n−23)=2n(m′+1)−23(2m′+1−1)>2nlog23n−n+23>2n(log23n−2).