Take a test Sign in 中文
← Exercise 911 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Digits (38)
Primes (31)
Fractions, Decimals, and the Floor Function (18)
Divisors, GCD, and LCM (36)
Divisibility (59)
Bases (15)
Modular Arithmetic (42)
Integer Equations (27)

Exercises and their solutions

Exercise 911
How many $1$s are there in the binary representation of $\dfrac{2^{63}+1}{2^{9}+1}$?
← Back to Problem 911
Solution
  1. Let $x=2^9$. Then $\dfrac{x^7+1}{x+1}=x^6-x^5+x^4-x^3+x^2-x+1=(x^6-x^5)+(x^4-x^3)+(x^2-x)+1$.
  2. Each pair $x^{2i-1}(x-1)=2^{9(2i-1)}(2^9-1)$ is a block of nine $1$s, in positions $9$–$17$, $27$–$35$, $45$–$53$, and the last $1$ is in position $0$.
  3. So there are $3\cdot9+1=\boxed{28}$ ones.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year