Closed low-valuation counts for every odd prime #
The full distribution specializes to compact formulas at valuations zero and
one. These are arithmetic counts on the complete block below p ^ k, not
asymptotic estimates.
The zero-carry coefficient in odd base 2 * half + 1.
theorem
OddPrimeValuationDistribution.coeff_zero_oddCarryPolynomialFrom_one_succ
(half length : ℕ)
:
Zero additional carries from incoming carry one, for positive word length.
Exact one-carry coefficient for every odd base, parameterized by block
length length + 2.
theorem
OddPrimeValuationDistribution.card_ternaryBlock_valuation_lt_two
(length : ℕ)
:
Fintype.card (OddPrimeBlockWithValuation 1 (length + 2) 0) + Fintype.card (OddPrimeBlockWithValuation 1 (length + 2) 1) = (length + 7) * 2 ^ length
Ternary specialization: among the integers below 3 ^ (length + 2), the
number whose central binomial coefficient has 3-adic valuation zero or one
is exactly (length + 7) * 2 ^ length.