Problem:
Define to be when is positive, when is negative, and when is . Compute
(The arguments to are in radians.)
Solution
Solution:
Note that each of the following is equivalent to the next.
The th digit after the decimal point in the binary representation of is .
Similarly, if and only if the th digit after the decimal point in the binary representation of is . In particular, if is the th digit, then .
Thus, the desired sum is
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.