If 2r−1≤k<2r, where r is an integer, then
r−1≤log2k<r⇒[log2k]=r−1
We have,
[log21]+[log22]+[log23]+⋯+[log2n]=1538
⇒[log220]+22−1∑k=2[log2 k]+23−1∑k=22[log2 k] +24−1∑k=23[log2 k]+⋯=1538
⇒0+22−1∑k=21+23−1∑k=222+24−1∑k=233+25−1∑k=244+⋯=1538
⇒0+1×2+2×22+3×23+4×24+⋯=1538
We observe that,
0+1×2+2×22+3×23+4×24 +5×25+6×26+4×27
=0+2+8+24+64+160+384+896=1538
⇒n=1+2+22+23+24+25+26+27∴n=(28−12−1)=255