返回题库

HMMT 二月 2009 · COMB 赛 · 第 5 题

HMMT February 2009 — COMB Round — Problem 5

专题
Contest Math / 竞赛数学
难度
L3
来源
HMMT

题目详情

英文原题

  1. [ 4 ] Let s ( n ) denote the number of 1’s in the binary representation of n . Compute
    ∑
    n s ( n )1
    2 ( − 1) .
    0 ≤ n< 16255
解析

英文解析

  1. [ 4 ] Let s ( n ) denote the number of 1’s in the binary representation of n . Compute
    ∑
    n s ( n )1
    2 ( − 1) .
    0 ≤ n< 16255
    Answer: 45
    ∑
    s ( n ) s ( n +8) 8 n s ( n )1
    Solution: Notice that if n < 8, ( − 1) = ( − 1) · ( − 1) so the sum becomes (1 − 2 ) 2 ( − 1) =
    0 ≤ n< 8
    45.255 1