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.
Replace each number by its popcount, which shrinks it fast, then count binary numbers below N by popcount with binomial coefficients.