返回题库

HMMT 二月 2009 · GEN1 赛 · 第 7 题

HMMT February 2009 — GEN1 Round — Problem 7

专题
Discrete Math / 离散数学
难度
L3
来源
HMMT

题目详情

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

1 1 1 3