The function S(n) is defined by the following triple summations:
The double brackets mean that the output of the triple summations is being rounded-off to the nearest integer. Write the function 'bitS(n)', which is the number of bits set in the binary representation of S(n).
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers10
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15811 Solvers
-
Project Euler: Problem 3, Largest prime factor
1819 Solvers
-
Project Euler: Problem 5, Smallest multiple
1675 Solvers
-
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
253 Solvers
-
5877 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Hmmm. It's a very clever problem, but I am getting different answers!
I am as well. For example, for n = 100, I get 4 (out of 7) bits set.
Chris -- Yes, exactly.
Let me check. Thanks.
Hi Chris/William,
Should be 'triple summations', sorry for that.