Parity

https://en.wikipedia.org/wiki/Parity_(mathematics)

  • Parity is the property of integers, ℤ

  • Parity determines an integer's inclusion in "even" or "odd" categories

  • An integer is even if it is divisible by 2, else it is odd

  • formally, an even integer is the one that can be expressed as n = 2k

  • formally, an odd integer is the one that can be expressed as n = 2k + 1

According to the formal definition, with k ∈ ℤ, an even integer is the one that can be expressed in the form n=2k. An odd integer is the one that can be expressed either as n=2k+1 or n=2k-1.

To express odd natural numbers, where k ∈ ℕ, only the form 2k+1 can be used if 0 ∈ ℕ (otherwise, we'd get -1 for k=0). However, if 0 ∉ ℕ then only the form 2k-1 can be used (otherwise, we couldn't get 1 at all).

In numeral systems with an even base, a number is even if its LSD is even.

In an odd base, the number is even according to the sum of its digits - it is even iff the sum of its digits is even.

https://en.wikipedia.org/wiki/Parity_of_zero

Last updated