Playing with Primes

A Positional Notation of Integers and Rationals Based on Prime Factorization

Let {p_i} denote the primes, i.e. {p_1 = 2}, {p_2 =3, p_3=5, p_4 =7, p_5=11, \dots} The fundamental theorem of number theory, as proved e.g. in (Gauss, 1870), tells us that each integer can be represented as a unique product of primes. Let us represent integers as infinite lists we call prime vectors.

Definition 3 For {z \in \mathbb{N}}, we have {z= \prod_{i=1}^\infty p_i^{k_i}}, where {k_i \in \mathbb{N}_0}. Define a prime vector as an infinite ordered list {p = (k_1, k_2, \dots)} that represents an integer. We write {p = P(z)} and {z = P^{-1}(z)} to map between these two representations. The space of prime vectors is denoted with {\mathbb{P}}

Lemma 4 The prime vectors represent all natural numbers in a unique way, i.e. {P} is a one to one correspondence between {\mathbb{N}} and {\mathbb{P}}.

Definition 5 We can extend the definition to all rational numbers: For {q \in \mathbb{Q}_+}, we have {q = \prod p_i^{k_i}} with {k_i \in \mathbb{Z}}. Let us call this representation of the rational numbers {\mathbb{P}_Q}.

Lemma 6 The prime vectors in {\mathbb{P}_Q} represent all rational numbers in a unique way, i.e. {P} is a one to one correspondence between {\mathbb{Q}_+} and {\mathbb{P}_Q}.

Definition 7 For notational convenience we write for prime vectors with infinitely repeated values {p =(a, a, \dots)\in \mathbb{P}} simply {(a, \dots)} or {(a)}.

Remark 1 We may augment the set {\mathbb{P}_Q} by {(-\infty, \dots)}, which is the infimum for any {k_i \rightarrow -\infty}. We define {P((-\infty, \dots)) := 0}.

Definition 8 We now define an operator on {\mathbb{P}} as follows: {a \odot b = (a_1 +b_1, a_2 +b_2, \dots)}

Lemma 9 Let {a = P(u)} and {b = P(v)} for {u,v \in \mathbb{Q}}. Then {P^{-1}(a \odot b) = u \cdot v}

Remark 2 It is much easier to multiply numbers if we code them as prime vectors.

Lemma 10 For {p \in \mathbb{P}}, {p \odot 0 = p}.

Remark 3 We can obviously associate {(0,\dots)} with the natural number {1}.

Lemma 11 {(\mathbb{P}_Q, \odot)} is a group with the neutral element 0.

Definition 12 Addition of two prime vectors {a} and {b}: Let {u = P^{-1}(a)} and {v = P^{-1}(b)}, then {a \oplus b = P(u + v)}

Remark 4 A hard question is to define addition of two numbers in {\mathbb{N}} or {\mathbb{Q}} using their representation in {\mathbb{P}_Q}. Further details on this question can be found in the “Prime Clockwork” article (Emmerich, 2024). There we define a successor function for a prime vector and also discuss addition of prime vectors and the role of congruences (moduli).
.

To include negative integers is relatively straightforward by just allowing prime vectors to have either a positive or a negative sign. The framework can also be extended in a rather straightforward manner to algebraic numbers by scalar multiplication of prime vectors by fractional exponents, but we leave a detailed elaboration to the future work.

Acknowledgement: I greatfully ackknowledge a discussion I had with Matti Eskelinen (homepage), in which much of the content of this article was developed.

Gauss, C. F. (1870). Disquisitiones arithmeticae (Vol. 1). Königliche Gesellschaft der Wissenschaften zu Göttingen.

Michael Emmerich: Prime Clockwork. published online August 15th 2024.

Leave a comment