Sub topic 1
What Makes an Integer Even or Odd
Prerequisites
This chapter assumes that you know what an integer is, can perform basic arithmetic with negative numbers, and understand divisibility and remainders. You should also know basic exponent notation, such as 2³ meaning 2 × 2 × 2.
The Definition of Parity
Parity is the property that tells whether an integer is even or odd. An integer is a whole number that may be positive, negative, or zero.
An integer is even if it can be written as 2k for some integer k. An integer is odd if it can be written as 2k + 1 for some integer k.
The letter k represents any integer. This definition includes negative integers:
- 8 is even because 8 = 2(4).
- −8 is even because −8 = 2(−4).
- 7 is odd because 7 = 2(3) + 1.
- −7 is odd because −7 = 2(−4) + 1.
- 0 is even because 0 = 2(0).
Zero is even. It is divisible by 2 with no remainder. Zero is not odd.
| Integer | Form | Classification |
|---|---|---|
| −6 | 2(−3) | Even |
| −5 | 2(−3) + 1 | Odd |
| 0 | 2(0) | Even |
| 9 | 2(4) + 1 | Odd |
Parity as a Remainder
When an integer is divided by 2, the remainder is either 0 or 1. An even integer has remainder 0. An odd integer has remainder 1.
For example, 14 divided by 2 has remainder 0, so 14 is even. The number 15 has remainder 1, so 15 is odd.
For negative integers, use the definition 2k or 2k + 1 rather than relying on a calculator's display of a remainder. For example, −11 = 2(−6) + 1, so −11 is odd.
The following program represents even numbers with 0 and odd numbers with 1. It checks the possible parity combinations for two integers.
for a in (0, 1):
for b in (0, 1):
print(a, b, (a + b) % 2, (a * b) % 2)Here, % 2 gives the remainder after division by 2. The values 0 and 1 are enough to represent parity, even though the original integers could have much larger absolute values.
Why the Definition Matters on the GRE
GRE questions often give a variable's parity without giving its value. The definition lets you replace the variable with a general form:
- If x is even, write x = 2k.
- If x is odd, write x = 2k + 1.
This substitution can prove a statement for every possible value, not just for selected examples. For instance, the sum of two odd integers is always even:
x + y = (2a + 1) + (2b + 1) = 2(a + b + 1).
Because a + b + 1 is an integer, the sum has the form 2k and is even.
A useful warning is that parity applies only to integers. Fractions and noninteger decimals are neither even nor odd. If a problem does not say that a variable is an integer, do not assume that parity rules apply.
Quick Classification Strategy
To classify an integer, check whether it is divisible by 2:
- If the number can be written as 2 times an integer, it is even.
- If it can be written as 2 times an integer plus 1, it is odd.
- Include zero among the even integers.
- Do not exclude negative integers. Their signs do not change their parity.
Exercise
Is −24 even or odd? Is −25 even or odd? Explain using the forms 2k and 2k + 1.
Show answer
−24 is even because −24 = 2(−12). −25 is odd because −25 = 2(−13) + 1.