Problem 3352 · Hard

Count K-Reducible Numbers Less Than N

Replace each number by its popcount, which shrinks it fast, then count binary numbers below N by popcount with binomial coefficients.

Open the interactive visualisation