Can decimal numbers be considered "even" or "odd"?

I am not saying that this is a way to consider "even" and "odd" numbers, but I think it's quite cool that it looks somehow as a generalization of this notion.

It doesn't make sense to look at the digits of an irrational number to determine its "parity", hence let's just stick with rational numbers.

When we were looking at integers, we said that an integer was even when it was divisible by $2$ and odd when it is not. Instead of using words, we could give much better information, which is to define a map $$ \begin{align} \nu_2 : \mathbb N & \to \mathbb N \cup \{ 0 \} \\ n=2^k m & \mapsto k \end{align} $$ where in the latter, $m$ is odd. The map $\nu$ then measures how even the integer $n$ is, in the sense that when there are more powers of 2 that divide $n$, it is considered "more divisible by two".

This concept can be generalized to the rational numbers : write $x = a/b$ with $a$ and $b \neq 0$ integers. Write $a = 2^{k_1} a'$ and $b=2^{k_2} b'$, so that $x = 2^{k_1 - k_2} (a'/b')$ and now both $a'$ and $b'$ are odd. Now define $\nu$ again in a similar manner : $$ \begin{align} \nu_2 : \mathbb Q & \to \mathbb Z \\ x = \frac{2^{k_1}a'}{2^{k_2}b'} & \mapsto k_1 - k_2. \end{align} $$ When $x$ is an integer, we recover the map we had before, so this can be considered as an extension of this map to the rational numbers.

I don't know if you have done some abstract algebra, but I am going to work things out a little more so that readers that might be interested find good information here.

If we replace $\nu_2$ by $\nu_p$, where $p$ is a prime number, all that we did works just fine and we get a map from $\mathbb Q$ to $\mathbb Z$ which indicates how much can a rational be divisible by $p$ (by allowing "negative divisibility" in some sense, because it also measures how many times $p$ divides the denominator). We are getting close to the concept of a discrete valuation, which is defined as the following : given a field $K$, a discrete valuation $\nu$ is a function from $K^{\times}$, the group of units, to $\mathbb Z$, which satisfies the following properties : $$ \begin{align} \nu(ab) & = \nu(a) + \nu(b) \\ \nu(a+b) & \ge \min \{ \nu(a),\nu(b) \} \end{align} $$ and must also be surjective. This function has many interesting algebraic properties. Recalling informations we had before such as "the set of all even integers form a ring", and just by considering this map and its properties, we can show that $$ \{ x \in K^{\times} \, | \, \nu(x) \ge 0 \} \cup \{ 0 \} $$ is a subring of $K$ which contains the identity of $K$. For some examples of how this is relevant, consider this : if we take the map $\nu_2$ we had before (over $\mathbb Q$), proving this fact means that the set of all rational numbers with odd denominator form a subring of $\mathbb Q$ (and so does the set of all rational numbers with denominators coprime to $p$). Valuations are extensively studied, and you can probably look it up on Wikipedia or ask for a reference if you are more interested in this.

Hope that helps!


Suppose we would like to define odd/even real numbers in some similar way as for integers. What could we do?

  • We could say that even numbers are all multiples of 2 by a real number, but then every real number would be even. Defining such a notion does not seem to be useful.

  • We could work only with real numbers that have finite decimal expansions. And for such numbers, we could say that it is odd/even based on the parity of the last digit. The first disadvantage of this definition is that it works only for some numbers. But - perhaps more importantly - it does not have the usual properties of addition, namely:
    $0.4+0.6=1$ even+even can be odd;
    $0.3+0.7=1$ odd+odd can be odd;
    $0.04+0.1=0.14$ even+odd can be even.
    So this definition would not make too much sense, either.


No, any ring where $2$ has an inverse $\rm\:u\:$ cannot sense parity since $\rm\:2\:u = 1\ \Rightarrow\ 1$ is even hence $\rm\ x = 1\cdot x\ $ yields that every element $\rm\:x\:$ is even. However, there are many rings which do have a notion of parity compatible with integer parity. For example, the subring of rationals with odd denominator have parity obtained by defining the parity of $\rm\:m/(2n+1)\:$ to be the parity of $\rm\:m\:.\:$ Further many rings of algebraic integers have a natural notion of parity, e.g. the Gaussian integers $\rm\:m + n\ {\it i},\ m,n \in \mathbb Z\ $ have parity by defining $\:i\:$ to be odd. For further discussion see my post here, and this post where parity in $\rm\:\mathbb Z[\sqrt{5}]\:$ implies that the integer $\rm\:(9+4\sqrt{5})^n + (9-4\sqrt{5})^n\:$ is even.