binary_digit_sum
def
The sum of the digits in the binary representation of a natural number k.
Statement
def binary_digit_sum (k : ℕ) : ℕ- Defined in
- arXiv:2611.26953, Section 1.1
- Verified
- 23 Nov 2026
- Axioms
- none listed
- Used by 2
- weighted_catalan_counterexample_satisfies_conditionsFor every integer t, the polynomial b_t satisfies: b_t(0) is odd; 2^(k - s_2(k)) divides (Δ^k b_t)(x) for all k ≥ 2 and all natural…
- weighted_catalan_conjecture_counterexampleFor every integer t, the function weighted_catalan_poly t satisfies: weighted_catalan_poly t 0 is odd; for all natural numbers k ≥ 2 and…
Read back from the Lean
binary_digit_sum is defined as a function taking a natural number k and returning the sum of the digits in the base-$2$ (binary) representation of k (computed as (Nat.digits 2 k).sum).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The sum of the binary digits of a natural number. -/ def binary_digit_sum (k : ℕ) : ℕ := (Nat.digits 2 k).sum