Problem 3827 · Easy

Count Monobit Integers

Count the integers from 0 to n whose binary digits are all the same, which are zero and the numbers of the form 2^L - 1.

Open the interactive visualisation