Menu Close

What-is-the-sum-in-base-10-of-all-the-natural-numbers-less-than-64-which-have-exactly-three-ones-in-their-base-2-representation-




Question Number 19704 by Tinkutara last updated on 14/Aug/17
What is the sum (in base 10) of all the  natural numbers less than 64 which  have exactly three ones in their base 2  representation?
$$\mathrm{What}\:\mathrm{is}\:\mathrm{the}\:\mathrm{sum}\:\left(\mathrm{in}\:\mathrm{base}\:\mathrm{10}\right)\:\mathrm{of}\:\mathrm{all}\:\mathrm{the} \\ $$$$\mathrm{natural}\:\mathrm{numbers}\:\mathrm{less}\:\mathrm{than}\:\mathrm{64}\:\mathrm{which} \\ $$$$\mathrm{have}\:\mathrm{exactly}\:\mathrm{three}\:\mathrm{ones}\:\mathrm{in}\:\mathrm{their}\:\mathrm{base}\:\mathrm{2} \\ $$$$\mathrm{representation}? \\ $$
Answered by mrW1 last updated on 15/Aug/17
“1” means 1, 2, 4, 8, 16, 32 from  right to left.  with three “1” we can get  following possible numbers:  32+16+8  32+16+4  32+16+2  32+16+1   ⇒ Σ=4×32+5×16−1=207  32+8+4  32+8+2  32+8+1  ⇒ Σ=3×32+4×8−1=127  32+4+2  32+4+1 ⇒ Σ=2×32+3×4−1=75  32+2+1 ⇒ 35  16+8+4  16+8+2  16+8+1 ⇒ Σ=3×16+4×8−1=79  16+4+2  16+4+1 ⇒ Σ=2×16+3×4−1=43  16+2+1 ⇒ 19  8+4+2  8+4+1 ⇒ Σ=2×8+3×4−1=27  8+2+1 ⇒11  4+2+1 ⇒ 7    Σ=207+127+75+35+79+43+19+27+11+7  =630
$$“\mathrm{1}''\:\mathrm{means}\:\mathrm{1},\:\mathrm{2},\:\mathrm{4},\:\mathrm{8},\:\mathrm{16},\:\mathrm{32}\:\mathrm{from} \\ $$$$\mathrm{right}\:\mathrm{to}\:\mathrm{left}. \\ $$$$\mathrm{with}\:\mathrm{three}\:“\mathrm{1}''\:\mathrm{we}\:\mathrm{can}\:\mathrm{get} \\ $$$$\mathrm{following}\:\mathrm{possible}\:\mathrm{numbers}: \\ $$$$\mathrm{32}+\mathrm{16}+\mathrm{8} \\ $$$$\mathrm{32}+\mathrm{16}+\mathrm{4} \\ $$$$\mathrm{32}+\mathrm{16}+\mathrm{2} \\ $$$$\mathrm{32}+\mathrm{16}+\mathrm{1}\:\:\:\Rightarrow\:\Sigma=\mathrm{4}×\mathrm{32}+\mathrm{5}×\mathrm{16}−\mathrm{1}=\mathrm{207} \\ $$$$\mathrm{32}+\mathrm{8}+\mathrm{4} \\ $$$$\mathrm{32}+\mathrm{8}+\mathrm{2} \\ $$$$\mathrm{32}+\mathrm{8}+\mathrm{1}\:\:\Rightarrow\:\Sigma=\mathrm{3}×\mathrm{32}+\mathrm{4}×\mathrm{8}−\mathrm{1}=\mathrm{127} \\ $$$$\mathrm{32}+\mathrm{4}+\mathrm{2} \\ $$$$\mathrm{32}+\mathrm{4}+\mathrm{1}\:\Rightarrow\:\Sigma=\mathrm{2}×\mathrm{32}+\mathrm{3}×\mathrm{4}−\mathrm{1}=\mathrm{75} \\ $$$$\mathrm{32}+\mathrm{2}+\mathrm{1}\:\Rightarrow\:\mathrm{35} \\ $$$$\mathrm{16}+\mathrm{8}+\mathrm{4} \\ $$$$\mathrm{16}+\mathrm{8}+\mathrm{2} \\ $$$$\mathrm{16}+\mathrm{8}+\mathrm{1}\:\Rightarrow\:\Sigma=\mathrm{3}×\mathrm{16}+\mathrm{4}×\mathrm{8}−\mathrm{1}=\mathrm{79} \\ $$$$\mathrm{16}+\mathrm{4}+\mathrm{2} \\ $$$$\mathrm{16}+\mathrm{4}+\mathrm{1}\:\Rightarrow\:\Sigma=\mathrm{2}×\mathrm{16}+\mathrm{3}×\mathrm{4}−\mathrm{1}=\mathrm{43} \\ $$$$\mathrm{16}+\mathrm{2}+\mathrm{1}\:\Rightarrow\:\mathrm{19} \\ $$$$\mathrm{8}+\mathrm{4}+\mathrm{2} \\ $$$$\mathrm{8}+\mathrm{4}+\mathrm{1}\:\Rightarrow\:\Sigma=\mathrm{2}×\mathrm{8}+\mathrm{3}×\mathrm{4}−\mathrm{1}=\mathrm{27} \\ $$$$\mathrm{8}+\mathrm{2}+\mathrm{1}\:\Rightarrow\mathrm{11} \\ $$$$\mathrm{4}+\mathrm{2}+\mathrm{1}\:\Rightarrow\:\mathrm{7} \\ $$$$ \\ $$$$\Sigma=\mathrm{207}+\mathrm{127}+\mathrm{75}+\mathrm{35}+\mathrm{79}+\mathrm{43}+\mathrm{19}+\mathrm{27}+\mathrm{11}+\mathrm{7} \\ $$$$=\mathrm{630} \\ $$
Commented by Tinkutara last updated on 15/Aug/17
Thank you very much Sir!
$$\mathrm{Thank}\:\mathrm{you}\:\mathrm{very}\:\mathrm{much}\:\mathrm{Sir}! \\ $$
Commented by mrW1 last updated on 16/Aug/17
there is an easier way to find the sum   without knowing each number:    2Σ=(1+2+4+8+16+32)×5×4=1260  ⇒Σ=1260/2=630
$$\mathrm{there}\:\mathrm{is}\:\mathrm{an}\:\mathrm{easier}\:\mathrm{way}\:\mathrm{to}\:\mathrm{find}\:\mathrm{the}\:\mathrm{sum}\: \\ $$$$\mathrm{without}\:\mathrm{knowing}\:\mathrm{each}\:\mathrm{number}: \\ $$$$ \\ $$$$\mathrm{2}\Sigma=\left(\mathrm{1}+\mathrm{2}+\mathrm{4}+\mathrm{8}+\mathrm{16}+\mathrm{32}\right)×\mathrm{5}×\mathrm{4}=\mathrm{1260} \\ $$$$\Rightarrow\Sigma=\mathrm{1260}/\mathrm{2}=\mathrm{630} \\ $$
Commented by ajfour last updated on 16/Aug/17
             111            1110, and 2 other 4 digit ones          11100, and 5 other 5 digit ones       111000, and 9 other 6 digit ones  111+Σ1110+Σ11100+Σ111000  =7+3×8+2(4+2+1)+           6×16+3(8+4+2+1)+           10×32+4(16+8+4+2+1)  = 7+24+14+96+45+320+124  =630 .
$$\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{111} \\ $$$$\:\:\:\:\:\:\:\:\:\:\mathrm{1110},\:\mathrm{and}\:\mathrm{2}\:\mathrm{other}\:\mathrm{4}\:\mathrm{digit}\:\mathrm{ones} \\ $$$$\:\:\:\:\:\:\:\:\mathrm{11100},\:\mathrm{and}\:\mathrm{5}\:\mathrm{other}\:\mathrm{5}\:\mathrm{digit}\:\mathrm{ones} \\ $$$$\:\:\:\:\:\mathrm{111000},\:\mathrm{and}\:\mathrm{9}\:\mathrm{other}\:\mathrm{6}\:\mathrm{digit}\:\mathrm{ones} \\ $$$$\mathrm{111}+\Sigma\mathrm{1110}+\Sigma\mathrm{11100}+\Sigma\mathrm{111000} \\ $$$$=\mathrm{7}+\mathrm{3}×\mathrm{8}+\mathrm{2}\left(\mathrm{4}+\mathrm{2}+\mathrm{1}\right)+ \\ $$$$\:\:\:\:\:\:\:\:\:\mathrm{6}×\mathrm{16}+\mathrm{3}\left(\mathrm{8}+\mathrm{4}+\mathrm{2}+\mathrm{1}\right)+ \\ $$$$\:\:\:\:\:\:\:\:\:\mathrm{10}×\mathrm{32}+\mathrm{4}\left(\mathrm{16}+\mathrm{8}+\mathrm{4}+\mathrm{2}+\mathrm{1}\right) \\ $$$$=\:\mathrm{7}+\mathrm{24}+\mathrm{14}+\mathrm{96}+\mathrm{45}+\mathrm{320}+\mathrm{124} \\ $$$$=\mathrm{630}\:. \\ $$
Commented by Tinkutara last updated on 16/Aug/17
Thank you both mrW1 and ajfour.
$$\mathrm{Thank}\:\mathrm{you}\:\mathrm{both}\:\mathrm{mrW1}\:\mathrm{and}\:\mathrm{ajfour}. \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *