baseparities
Baseparities is a term used in discussions of number representation to denote parity-type invariants that depend on how an integer is written in a fixed base b ≥ 2. In this framework, a baseparity of an integer n is any quantity computed from the digits of n in base b and considered modulo 2. The concept encompasses several concrete measures, most commonly the parity of the digit sum and the parity of the number of nonzero digits.
Formally, if n is written in base b as n = sum_{i=0}^k d_i b^i with 0 ≤ d_i <
- Digit-sum parity: (sum_i d_i) mod 2.
- Hamming parity: (number of i with d_i ≠ 0) mod 2.
These invariants are determined solely by the base-b digits of n and are stable under base-conversion operations
Key properties include a simple relation for odd bases. If b is odd, then n ≡ sum_i d_i
Baseparities have applications in digital-sum analysis, automata-theoretic characterizations of number representations, and in coding or cryptographic