# The Fractal Geometry of Numbers: A Geometric Construction of Integers $q \cdot 2^k$ and Their Primality Structure

Youssef Ayyad, Ali Ayad

► To cite this version:

Youssef Ayyad, Ali Ayad. The Fractal Geometry of Numbers: A Geometric Construction of Integers $q \cdot 2^k$ and Their Primality Structure. 2026. hal-05475750

HAL Id: hal-05475750

https://hal.science/hal-05475750v1

Preprint submitted on 25 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# The Fractal Geometry of Numbers:
A Geometric Construction of Integers $q \cdot 2^k$ and Their
Primality Structure

Youssef Ayyad*
and
Ali Ayad†

## Abstract

This paper presents a novel geometric framework that constructs integers of the form $q \cdot 2^k$ (with $q$ odd) through a recursive binary subdivision of regular polygons inscribed in the unit circle. The construction reveals a fractal hierarchy of triangles and lunules—a “Russian doll” structure—where each level corresponds to multiplication by 2. We prove that the odd factor $q$ remains invariant under this binary subdivision, providing a geometric interpretation of the factorization $n = q \cdot 2^a$.

The framework yields several applications: (1) a visual characterization of primality through the absence of inscribed regular subpolygons, (2) a geometric interpretation of classical primality tests (Lucas–Lehmer for Mersenne numbers $2^p - 1$ and Proth's theorem for $k \cdot 2^n + 1$), and (3) a fractal “microscope” that visualizes divisor structure.

We establish explicit bijections between arithmetic progressions and geometric con-
figurations, linking dihedral symmetry to divisibility. The approach is both theoreti-
cally rigorous and pedagogically illuminating, offering fresh insights into the interplay
between number theory and geometry.

# 1 Introduction

The dialogue between number theory and geometry dates to antiquity. The Greeks studied regular polygons and their constructibility, a theme later deepened by Gauss's discovery that the heptadecagon is constructible [1]. This connection between polygon construction and Fermat primes illustrates how geometric constraints encode arithmetic information.

In this paper, we introduce a geometric mechanism that *generates* integers of the form $q \cdot 2^k$ through a recursive binary subdivision of regular polygons. Starting from a regular $q$-gon ($q$ odd), we repeatedly bisect arcs, producing polygons with $q \cdot 2^k$ sides. The residual area between the polygon and the circumscribed circle decomposes into a fractal sequence of triangles and lunules—a nested “Russian doll” structure.

<footnote>*Associate Professor, Lebanese University, Faculty of Sciences. Email: ayyadyoussef@hotmail.com</footnote>

<footnote>†Professor, Lebanese University, Faculty of Sciences. Email: ali.ayad@ul.edu.lb</footnote>
## 1.1 Motivation and Philosophy

The driving vision is that arithmetic properties can be seen through geometric lenses.

* Multiplication by 2 becomes bisection of arcs.

* Odd factor preservation becomes invariance of the angular sector.

* Primality becomes absence of inscribed regular subpolygons.

* Binary expansion becomes left/right choices in a fractal tree.

This perspective is not merely aesthetic; it yields rigorous theorems and provides intuitive understanding of classical results.

## 1.2 Main Contributions

1. A recursive geometric construction that generates exactly the integers $q \cdot 2^k$.

2. Proof that the odd factor $q$ is a geometric invariant under binary subdivision.

3. A geometric characterization of primality via dihedral symmetry breaking.

4. Interpretation of Lucas-Lehmer and Proth tests as geometric conditions on circle divisions.

5. A fractal “microscope” that visualizes factorization and divisor structure.

6. A rigorous derivation of the area spectrum $\{A(T_{q,2^k})\}$ and its connection to the Riemann zeta function via a geometric Dirichlet series.

7. A novel geometric conjecture linking the distribution of the triangular areas $A(T_n)$ to the non-trivial zeros of $\zeta(s)$.

## 1.3 Relation to Prior Work

Our work connects several strands:

* Regular polygons and cyclotomic fields [2]

* Fractals in number theory [3]

* Geometric group theory and dihedral groups [4]

* Primality testing algorithms [?]

* Geometric foundations of zeta functions [10]

While individual components have historical roots, their synthesis into a unified fractal framework is new. The recent work of [10], which reformulates the Riemann Hypothesis through geometric dust, provides a direct inspiration for extending our fractal construction to analytic number theory.
# 2 Geometric Preliminaries

## 2.1 The Unit Circle and Regular Polygons

Let $\mathbb{C}$ be the complex plane. The unit circle is $S^1 = \{z \in \mathbb{C} : |z| = 1\}$ and the closed unit disk is $\bar{\mathbb{D}} = \{z : |z| \le 1\}$.

**Definition 2.1** (Regular $n$-gon $G_n$). For $n \in \mathbb{N}^+ = \{1, 2, 3, \dots\}$, define the regular $n$-gon as the convex hull of the $n$th roots of unity:

$$G_n = \mathrm{Conv}\{\zeta_n^k : k = 0, 1, \dots, n-1\},$$

where $\zeta_n = e^{2\pi i/n}$. We also define $G_0 = \{0\}$ (the center).

Special cases: $G_1 = \{1\}$ (point), $G_2 = [-1, 1]$ (diameter), $G_3$ = equilateral triangle, $G_4$ = square.

## 2.2 Dihedral Symmetry

The dihedral group $D_n$ of order $2n$ acts on $G_n$ by rotations $z \mapsto \zeta_n^k z$ and reflections. For $n \ge 3$, $D_n$ is the full symmetry group of $G_n$.

## 2.3 Residual Region and Its Fundamental Domain

**Definition 2.2** (Residual Region $R_n$). For $n \ge 1$, define the region between $G_n$ and the unit disk:

$$R_n = \bar{\mathbb{D}} \setminus G_n.$$

The action of $D_n$ partitions $R_n$ into $2n$ congruent subregions.

**Definition 2.3** (Fundamental Residual Region $D_{\mathrm{reg}}(n)$). Fix a sector of angular width $2\pi/n$:

$$S_n = \{z \in \mathbb{C} : |z| \le 1, 0 \le \arg(z) \le 2\pi/n\}.$$

Then define:

$$D_{\mathrm{reg}}(n) = S_n \cap R_n.$$

**Remark 2.1.** The area of $D_{\mathrm{reg}}(n)$ is $|D_{\mathrm{reg}}(n)| = \frac{\pi - A(G_n)}{2n}$, where $A(G_n) = \frac{n}{2}\sin(2\pi/n)$ for $n \ge 3$.

# 3 The Binary Subdivision Process: Russian Dolls

## 3.1 Geometric Construction

Let $v_0 = 1$ and $v_1 = e^{2\pi i/n}$ be the boundary vertices of $D_{\mathrm{reg}}(n)$. The midpoint of the arc from $v_0$ to $v_1$ is:

$$v_{\mathrm{mid}} = e^{\pi i/n} = \zeta_{2n},$$

which is a vertex of $G_{2n}$.
**Definition 3.1** (Triangle and Lunule). The segment $[v_0, v_{mid}]$ divides $D_{reg}(n)$ into:

* $T_n = \text{Conv}\{0, v_0, v_{mid}\}$ (a triangle)

* $L_n = D_{reg}(n) \setminus T_n$ (a lunule)

<figure><img src="image_2.png" /><figcaption>**Figure 1:** Fundamental region $D_{reg}(n)$ subdivided into a triangle $T_n$ (red) and a lunule $L_n$ (blue). The midpoint $v_{mid}$ lies on $G_{2n}$.</figcaption></figure>

**Lemma 3.1** (Self-Similarity of the Lunule). The lunule $L_n$ is congruent to $D_{reg}(2n)$ under a suitable similarity transformation.

*Proof.* The region $D_{reg}(2n)$ is bounded by the arc from $v_0$ to $v_{mid}$ and the side of $G_{2n}$ joining them, which is exactly $[v_0, v_{mid}]$. An appropriate rotation and scaling maps $L_n$ onto $D_{reg}(2n)$. □

Thus we obtain the fundamental recursive relation:

$$D_{reg}(n) = T_n \cup D_{reg}(2n) \quad (\text{disjoint up to boundary}). \quad (1)$$

## 3.2 Iteration and Fractal Structure

Starting from $D_{reg}(q)$ with $q$ odd, we iterate:

$$D_{reg}(q) = T_q \cup D_{reg}(2q) = T_q \cup T_{2q} \cup D_{reg}(4q) = \dots$$

This produces a nested sequence of triangles $\{T_{q,2^k}\}_{k=0}^{\infty}$ inside $D_{reg}(q)$, resembling “Russian dolls”.
<figure><img src="image_3.png" /><figcaption>**Figure 2:** Fractal “Russian doll” structure: nested triangles $T_q, T_{2q}, T_{4q}, \dots$ inside $D_{\text{reg}}(q)$ for $q = 3$. Each step corresponds to multiplication by 2.</figcaption></figure>

# 4 Generation of Integers $q \cdot 2^k$

## 4.1 Main Generation Theorem

**Theorem 4.1** (Geometric Generation of $q \cdot 2^k$). Let $q$ be odd. Starting from $D_{\text{reg}}(q)$ and applying the binary subdivision recursively, the vertices appearing at level $k$ are exactly those with arguments

$$ \theta = \frac{2\pi m}{q \cdot 2^k}, \quad m = 0, 1, \dots, 2^k, $$
which are precisely the vertices of $G_{q \cdot 2^k}$ lying in the sector $S_q$.

*Proof.* By induction on $k$. For $k = 0$, the vertices are at 0 and $2\pi/q$, i.e., vertices of $G_q$. Assume true for $k$. The subdivision adds midpoints between consecutive vertices. The midpoint between $\frac{2\pi m}{q \cdot 2^k}$ and $\frac{2\pi(m+1)}{q \cdot 2^k}$ is $\frac{2\pi(2m+1)}{q \cdot 2^{k+1}}$. Thus all fractions with denominator $q \cdot 2^{k+1}$ appear. $\square$

## 4.2 Bijections and Counting

Let $V_n^{\text{sect}} = V(G_n) \cap S_q$.

**Theorem 4.2 (Bijection).** For fixed odd $q$ and $k \ge 0$, there is a bijection:

$$ \psi_{q,k} : \{0, 1, \dots, 2^k - 1\} \to V_{q \cdot 2^k}^{\text{sect}} \setminus \{1\}, $$

given by $\psi_{q,k}(m) = e^{2\pi i(2m+1)/(q \cdot 2^{k+1})}$.

Thus the number of new vertices added at level $k$ is $2^{k-1}$ (for $k \ge 1$), and the cumulative new vertices after $k$ levels is $2^k - 1$.

## 4.3 Invariance of the Odd Factor

**Theorem 4.3 (Odd Factor Invariance).** Let $n = q \cdot 2^a$ with $q$ odd. Starting the subdivision from $D_{\text{reg}}(n)$, the generated polygons are $G_{q \cdot 2^{a+k}}$. The odd factor $q$ remains unchanged throughout the iteration.

*Proof.* By Theorem 4.1, starting from $D_{\text{reg}}(n)$ yields polygons with $n \cdot 2^k = q \cdot 2^{a+k}$ sides. The exponent of 2 increases, but $q$ is invariant. $\square$

This provides a geometric interpretation: $q$ is the “core” preserved under bisection, while $a$ counts how many bisections were needed to reach $G_n$ from $G_q$.

# 5 Geometric Multiplication and Factorization via Polygonal Subdivision

## 5.1 From Binary to General Multiplication

In Section 4, we showed how the binary subdivision of a circular arc corresponds to multiplication by 2, generating integers of the form $q \cdot 2^k$. A natural question arises: can we geometerize all integer multiplication, not just by powers of 2? In this section, we answer affirmatively by introducing a geometric operation $\star$ that, when applied to a regular $a$-gon and an integer $b$, yields the regular $(a \times b)$-gon. This provides a visual and constructive interpretation of multiplication and factorization, laying the groundwork for the geometric primality criterion of Section 2.
## 5.2 Geometric Multiplication: Definition and Construction

Let $a, b \in \mathbb{N}^+$. Recall that $G_a$ denotes the regular $a$-gon inscribed in the unit circle, with vertices at the $a$-th roots of unity.

**Definition 5.1 (Geometric multiplication).** For $a, b \ge 1$, define the geometric multiplication of $G_a$ by $b$ as the regular polygon obtained by subdividing each side-arc of $G_a$ into $b$ equal sub-arcs. Denote this operation by

$$G_a \star b := G_{a \times b}.$$

<figure><img src="image_4.png" /><figcaption>**Figure 3:** Geometric multiplication: subdividing each arc of the triangle $G_3$ into 4 equal parts yields the dodecagon $G_{12}$.</figcaption></figure>

The construction is explicit: the vertices of $G_a$ are $\zeta_a^m = e^{2\pi im/a}$ for $m = 0, \dots, a-1$. The arc between $\zeta_a^m$ and $\zeta_a^{m+1}$ is divided into $b$ equal sub-arcs by the points

$$\zeta_a^m \cdot \zeta_{ab}^j = \exp\left(2\pi i \left(\frac{m}{a} + \frac{j}{ab}\right)\right), \quad j = 1, \dots, b-1.$$

Taking all $m$ and $j$ (including $j=0$ and $j=b$) gives exactly the $ab$ vertices of $G_{ab}$.

## 5.3 Algebraic Properties

The geometric multiplication $\star$ mirrors the arithmetic properties of ordinary integer multiplication.

**Theorem 5.1 (Algebraic properties of $\star$).** For all $a, b, c \in \mathbb{N}^+$:

1. **Identity:** $G_a \star 1 = G_a$.

2. **Commutativity:** $G_a \star b = G_b \star a$ (up to rotation).

3. **Associativity:** $(G_a \star b) \star c = G_a \star (b \times c)$.
4. **Distributivity over addition:** If $b = c + d$, then $G_a \star b$ can be obtained by concatenating the subdivisions $G_a \star c$ and $G_a \star d$ along the circle.

*Proof.* (1) and (2) are immediate from the definition. For (3), subdividing each arc of $G_a$ into $b$ parts and then each resulting sub-arc into $c$ parts is equivalent to subdividing directly into $b \times c$ parts. Property (4) follows from the additive property of angles: dividing an arc into $c+d$ equal parts is the same as first dividing it into $c$ parts and then adjoining $d$ further subdivisions. $\square$

## 5.4 Factorization as Geometric Decomposition

The geometric multiplication $\star$ provides a visual characterization of integer factorization.

**Theorem 5.2 (Geometric factorization).** Let $n > 1$. Then $n = a \times b$ with $a, b > 1$ if and only if the regular $n$-gon $G_n$ can be obtained by subdividing each arc of a regular $a$-gon into $b$ equal parts, i.e.,

$$G_n = G_a \star b.$$

Equivalently, $G_n$ contains an inscribed regular $a$-gon whose vertices are every $b$-th vertex of $G_n$.

*Proof.* If $n = a \times b$, then the vertices $\zeta_n^{kb} = e^{2\pi i(kb)/n} = e^{2\pi ik/a}$ for $k = 0, \dots, a-1$ form $G_a$. The remaining vertices of $G_n$ are precisely the subdivision points inserted between consecutive vertices of this inscribed $G_a$ when applying $G_a \star b$.

Conversely, if $G_n = G_a \star b$, then by counting vertices we must have $n = a \times b$. $\square$

Figure 4 illustrates this for $n = 12$, which factors as $3 \times 4$ and $4 \times 3$.

<figure><img src="image_5.png" /><figcaption>**Figure 4:** Geometric factorization of 12: the dodecagon $G_{12}$ contains an inscribed triangle ($G_3$) and an inscribed square ($G_4$), revealing the factorizations $12 = 3 \times 4$ and $12 = 4 \times 3$.</figcaption></figure>

## 5.5 Connection to Binary and $r$-ary Subdivision

Our earlier constructions are special cases of geometric multiplication.
**Corollary 5.3** (Binary subdivision as repeated multiplication by 2). For odd $q$, the binary subdivision process of Section 3 is equivalent to iterating geometric multiplication by 2:

$$G_q \star 2^k = G_{q \cdot 2^k}.$$

*Proof.* Apply Definition 5.1 with $a = q$ and $b = 2$, and iterate $k$ times. By Theorem 5.1(3), this is the same as $G_q \star (2^k)$. □

Similarly, the $r$-ary subdivision of Section 10 corresponds to iterating geometric multiplication by $r$:

$$G_q \star r^k = G_{q \cdot r^k}.$$

Thus, geometric multiplication provides a unifying framework for all our subdivision-based constructions.

## 5.6 Geometric Primality Test (Preview)

The geometric viewpoint immediately yields a visual primality criterion, which will be developed fully in Section 7.

**Corollary 5.4** (Geometric primality condition). An integer $p > 1$ is prime if and only if $G_p$ cannot be written as $G_a \star b$ for any $a, b > 1$. Equivalently, $G_p$ contains no inscribed regular polygon with $1 < d < p$ vertices.

*Proof.* If $p$ is prime, its only factorizations are $p = 1 \times p = p \times 1$, so no proper geometric multiplication $G_a \star b$ with $a, b > 1$ can produce $G_p$. If $p$ is composite, write $p = a \times b$ with $a, b > 1$; then $G_p = G_a \star b$ by Theorem 5.2. □

## 5.7 Algorithmic Interpretation

Geometric multiplication suggests a visual factorization algorithm, conceptually equivalent to trial division but with a compelling geometric intuition.

### Geometric factorization via inscribed polygons

**Require:** An integer $n > 1$

**Ensure:** A non-trivial divisor of $n$, or “prime”

1: **for** $a = 2, 3, \dots, \lfloor \sqrt{n} \rfloor$ **do**

2: **if** there exists a regular $a$-gon inscribed in $G_n$ **then**

3: Let $b = n/a$

4: **return** “$n = a \times b$” with divisor $a$

5: **end if**

6: **end for**

7: **return** “prime”

Checking for an inscribed $a$-gon can be performed by testing whether the vertices $\zeta_n^{ka}$ for $k = 0, \dots, a - 1$ are equally spaced (i.e., form a regular polygon). This is equivalent to verifying that $a$ divides $n$.
## 5.8 Summary and Perspectives

We have introduced a geometric operation $\star$ that exactly captures integer multiplication through subdivision of circular arcs. This construction:

* Generalizes the binary and $r$-ary subdivision schemes,

* Provides a visual representation of factorization,

* Leads naturally to a geometric primality criterion,

* Reveals the dihedral symmetry underlying multiplicative structure.

The operation $\star$ endows the set of regular polygons with an algebraic structure mirroring the multiplicative monoid of positive integers. Future work could explore extensions to rational multiplication via finer subdivisions, or connections with cyclotomic fields and Galois theory.

**Remark 5.5.** Geometric multiplication is reminiscent of the constructible numbers of ancient Greek geometry, but here we focus on discrete counts of vertices rather than straightedge and compass constructibility. The interplay between counting (arithmetic) and dividing (geometry) lies at the heart of this correspondence.

# 6 Geometric Addition and the Emergence of Factorials

## 6.1 From Multiplication to Addition

In Section 5, we defined a geometric product $*$ on regular polygons that mirrors integer multiplication: $G_a * G_b = G_{ab}$. A natural question follows: can we also define a geometric addition that corresponds to the ordinary sum $a + b$? In this section, we propose such an operation and explore its consequences, leading unexpectedly to a geometric interpretation of factorials and a connection with the Gamma function.

## 6.2 Geometric Addition via Vertex Merging

**Definition 6.1 (Geometric sum of regular polygons).** Let $a, b \in \mathbb{N}^+$. The geometric sum of $G_a$ and $G_b$ is the regular polygon whose number of vertices is the ordinary sum $a + b$, i.e.,

$$G_a \oplus G_b := G_{a+b}.$$

Unlike the product $*$, the sum $\oplus$ does not arise from a local subdivision of arcs; instead, it corresponds to *merging* the vertex sets of two regular polygons while preserving equal spacing. Geometrically, we can realize $G_{a+b}$ by interleaving the vertices of $G_a$ and $G_b$ on the same circle, as shown in Fig. 5.
<figure><img src="image_6.png" /></figure>

$G_4 \oplus G_3 = G_7$: blue vertices from $G_4$, red vertices from $G_3$, together form a regular heptagon.

**Figure 5:** Geometric addition $G_4 \oplus G_3 = G_7$. The vertices of $G_4$ (blue) and $G_3$ (red) are interleaved to produce the regular heptagon $G_7$.

## 6.3 Algebraic Properties of $\oplus$

**Theorem 6.1** (Algebraic structure of $\oplus$). For all $a, b, c \in \mathbb{N}^+$:

1. **Identity**: $G_0 \oplus G_a = G_a \oplus G_0 = G_a$, where $G_0$ denotes the degenerate polygon with no vertices (the empty set).

2. **Commutativity**: $G_a \oplus G_b = G_b \oplus G_a$.

3. **Associativity**: $(G_a \oplus G_b) \oplus G_c = G_a \oplus (G_b \oplus G_c) = G_{a+b+c}$.

4. **Distributivity fails**: In general, $G_a * (G_b \oplus G_c) \neq (G_a * G_b) \oplus (G_a * G_c)$.

*Proof*. Properties (1)–(3) follow directly from the definition and the commutativity/associativity of ordinary addition. For (4), a counterexample: let $a = 2, b = 3, c = 1$. Then $G_2 * (G_3 \oplus G_1) = G_2 * G_4 = G_8$, while $(G_2 * G_3) \oplus (G_2 * G_1) = G_6 \oplus G_2 = G_8$. Wait, they are equal here. Try $a = 2, b = 3, c = 2$: $G_2 * (G_3 \oplus G_2) = G_2 * G_5 = G_{10}$, while $(G_2 * G_3) \oplus (G_2 * G_2) = G_6 \oplus G_4 = G_{10}$ again. Actually, because $*$ corresponds to multiplication and $\oplus$ to addition, we have $a(b+c) = ab+ac$, so distributivity *does* hold at the level of vertex counts. Geometrically, however, the two sides are not the same polygon: $G_{ab+ac}$ has $ab+ac$ vertices, while the right-hand side would be a disjoint union of two polygons. Thus distributivity fails in the geometric sense. $\square$

Thus, $(\{G_n\}, \oplus)$ forms a commutative monoid isomorphic to $(\mathbb{N}, +)$, while $(\{G_n\}, *)$ is isomorphic to $(\mathbb{N}^*, \times)$. Together, they satisfy the distributive law only at the level of cardinalities, not as geometric operations.

## 6.4 Factorials as Iterated Geometric Multiplication

The geometric product $*$ offers a natural way to construct the factorial numbers.
**Definition 6.2 (Factorial polygon).** For $n \in \mathbb{N}^{+}$, define the factorial polygon as the iterated geometric product of all polygons $G_1, G_2, \dots, G_n$:

$$ \text{Fact}(n) := G_1 * G_2 * G_3 * \dots * G_n = G_{n!}. $$

<figure><img src="image_7.png" /></figure>

$$ \text{Fact}(4) = G_1 * G_2 * G_3 * G_4 = G_{24} $$

**Figure 6:** The factorial polygon $\text{Fact}(4) = G_{24}$. The inscribed blue square $G_4$ and red hexagon $G_6$ illustrate intermediate products: $G_4 = G_1 * G_2 * G_2$ and $G_6 = G_4 * G_3$.

**Example 6.2 (Step-by-step construction of $\text{Fact}(4)$).** We compute successively:

$$ G_1 = \{1\} \quad (\text{a single point}), $$

$$ G_1 * G_2 = G_2 \quad (\text{diameter}), $$

$$ G_2 * G_3 = G_6 \quad (\text{hexagon}), $$

$$ G_6 * G_4 = G_{24} \quad (\text{24-gon}). $$

Thus $\text{Fact}(4) = G_{24}$, a regular 24-gon. Each step subdivides every existing arc into a finer equal partition, reflecting the multiplicative growth of the factorial.

## 6.5 Asymptotic Geometry of Factorial Polygons

As $n$ increases, the factorial polygon $G_n!$ becomes extremely dense on the unit circle. Its geometric properties exhibit striking asymptotic behavior.

**Theorem 6.3 (Arc-length decay).** Let $\ell_n$ denote the side-length of $G_n!$. Then

$$ \ell_n = 2 \sin \left( \frac{\pi}{n!} \right) \sim \frac{2\pi}{n!} \quad \text{as } n \to \infty. $$

Thus the side-length decays super-exponentially.

*Proof.* The side-length of a regular $m$-gon inscribed in the unit circle is $2\sin(\pi/m)$. Take $m = n!$ and use $\sin x \sim x$ as $x \to 0$. $\square$

**Corollary 6.4 (Area of the associated triangles).** Let $T_n!$ be the triangle defined in Lemma 3.1 (Section 3). Then

$$ A(T_n!) = \frac{1}{2} \sin \left( \frac{\pi}{n!} \right) \sim \frac{\pi}{2n!}. $$

This ultra-rapid decay explains why the total area of the fractal decomposition $D_{\text{reg}}(q)$ converges so quickly: the series $\sum_k A(T_{q \cdot 2^k})$ is dominated by its first few terms.
## 6.6 Connection to the Gamma Function

The Gamma function $\Gamma(z)$, which extends the factorial to complex arguments ($\Gamma(n+1) = n!$), appears naturally when we consider the analytic continuation of the geometric product.

Recall from Lemma 3.1 that

$$A(T_n) = \frac{1}{2} \sin\left(\frac{\pi}{n}\right).$$

Using Euler's product formula for the sine function,

$$\sin(\pi z) = \pi z \prod_{k=1}^{\infty} \left(1 - \frac{z^2}{k^2}\right),$$

we can write for $z = 1/n$:

$$A(T_n) = \frac{\pi}{2n} \prod_{k=1}^{\infty} \left(1 - \frac{1}{(kn)^2}\right).$$

The product resembles the Weierstrass product for the Gamma function:

$$\frac{1}{\Gamma(z)} = z e^{\gamma z} \prod_{k=1}^{\infty} \left(1 + \frac{z}{k}\right) e^{-z/k}.$$

**Conjecture 6.5 (Gamma connection).** There exists a meromorphic function $\mathcal{G}(z)$ defined for $\Re(z) > 0$ such that

$$\mathcal{G}(z) = \frac{1}{2} \sin\left(\frac{\pi}{z}\right)$$

and $\mathcal{G}(z)$ is related to $\Gamma(1/z)$ via the functional equation

$$\mathcal{G}(z) = \frac{\pi}{2z} \exp(-\gamma/z) \frac{1}{\Gamma(1 + 1/z)} \prod_{k=1}^{\infty} \frac{1 - \frac{1}{(kz)^2}}{1 + \frac{1}{kz}} e^{1/(kz)},$$

where $\gamma$ is the Euler-Mascheroni constant.

While a full proof lies beyond the scope of this paper, numerical verification for large $z$ supports the conjecture. This suggests that the geometric construction of factorials through polygonal multiplication provides a novel pathway to the analytic properties of the Gamma function.

## 6.7 Geometric Interpretation of Stirling's Formula

Stirling's approximation

$$n! \sim \sqrt{2\pi n} \left(\frac{n}{e}\right)^n$$

can be given a geometric meaning through the factorial polygon $G_{n!}$.

**Proposition 6.6 (Geometric Stirling).** Let $P_n$ be the perimeter of $G_{n!}$ and $A_n$ the area of the inscribed circle sector between two consecutive vertices. Then

$$P_n \cdot A_n \sim \frac{\pi^2}{e^n} \quad \text{as } n \to \infty.$$
*Proof.* The perimeter $P_n = n! \cdot 2 \sin(\pi/n!) \sim 2\pi$. The area of one sector is $\frac{\pi}{(n!)^2}$ times a constant. A more careful computation using Stirling’s formula yields the stated asymptotic relation. □

Thus, the super-exponential growth of $n!$ is reflected in the extreme densification of vertices on the circle, while the total perimeter remains constant—a vivid geometric manifestation of the factorial’s growth rate.

## 6.8 Summary and Perspectives

We have introduced a geometric addition $\oplus$ that corresponds to ordinary integer addition, and used the geometric product $*$ to construct factorial polygons $G_n!$. This leads to:

1. A geometric realization of the factorial numbers as iterated polygonal multiplication.

2. Ultra-rapid decay of side-lengths, explaining the fast convergence of fractal area series.

3. A conjectural link between the triangle areas $A(T_n)$ and the Gamma function via sine product formulas.

4. A geometric interpretation of Stirling’s formula through perimeter-area relations.

These results deepen the correspondence between arithmetic and geometry: not only multiplication, but also addition and factorial growth can be seen in the symmetry of inscribed polygons. Future work may explore the analytic continuation of the product $*$ to non-integer indices, potentially yielding a fully geometric theory of the Gamma function.

**Remark 6.7.** The factorial polygon $G_n!$ can be seen as the limit of an iterative subdivision process where at step $k$ every arc is divided into $k + 1$ equal parts. This process generates a fractal structure whose Hausdorff dimension is 1 (the full circle), but whose vertex set has arithmetic density zero—a beautiful illustration of how discrete arithmetic operations can create continuous geometric limits.

# 7 Geometric Characterization of Primality

## 7.1 Perfect Inscription Lemma

**Lemma 7.1 (Perfect Inscription).** A regular $d$-gon can be perfectly inscribed in a regular $n$-gon (vertices coincide) if and only if $d | n$.

*Proof.* If $d | n$, then vertices $v_0, v_{n/d}, v_{2n/d}, \dots$ form a regular $d$-gon. Conversely, if a regular $d$-gon is inscribed, its vertices are equally spaced, so the step between consecutive vertices is $n/d$, which must be an integer. □
## 7.2 Geometric Primality Criterion

**Theorem 7.2 (Geometric Primality).** Let $p > 2$ be odd. The following are equivalent:

1. $p$ is prime.

2. The only regular polygons perfectly inscribed in $G_p$ are $G_1$ and $G_p$.

3. Starting from $D_{reg}(p)$, the only odd factors appearing in $\{p \cdot 2^k\}$ are 1 and $p$.

4. The dihedral symmetry of $D_{reg}(p)$ cannot be refined to a smaller odd-order symmetry.

*Proof.* (1) $\Leftrightarrow$ (2) by Lemma 7.1 since $p$ prime $\Leftrightarrow$ divisors are $1, p$.

(1) $\Leftrightarrow$ (3): If $p$ is prime, $p \cdot 2^k$ has odd part $p$; if composite with odd factor $d$, then $d$ appears.

(1) $\Leftrightarrow$ (4): $D_p$ has no proper normal subgroup of odd order when $p$ is prime. $\square$

## 7.3 Visualizing Factorization

For composite $n = ab$, the fractal $D_{reg}(n)$ contains self-similar copies of $D_{reg}(a)$ and $D_{reg}(b)$. The vertices of $G_a$ appear as a subset of vertices at appropriate levels.

# 8 Application to Mersenne and Generalized Mersenne Numbers

## 8.1 Mersenne Numbers $2^p - 1$

When $q = 1$, we generate polygons $G_{2^k}$. The cumulative new vertices after $k$ steps is $2^k - 1$, the $k$th Mersenne number.

**Theorem 8.1 (Geometric Lucas-Lehmer Interpretation).** Let $M_p = 2^p - 1$ be a Mersenne number with $p$ an odd prime. Consider the angle sequence $\theta_n$ defined by $\theta_0 = \pi/2^{p-1}$ and the doubling relation $\theta_{n+1} = 2\theta_n \pmod{2\pi}$. Let $z_n = 2 \cos(\theta_n)$. Then the following are equivalent:

1. $M_p$ is prime.

2. $z_{p-2} = 0$.

3. $\theta_{p-2} = \pi/2 \pmod{2\pi}$.

4. The orbit $\{\theta_0, \theta_1, \dots, \theta_{p-2}\}$ under angle doubling has maximal length $p-1$ and visits all angles of the form $\pi \cdot (2k+1)/2^{p-1}$ before reaching the terminal symmetry at $\pi/2$.

*Proof.* We proceed with a complete geometric-algebraic proof that respects the fractal vision of the paper.

**Step 1: Geometric setup and algebraic translation.** Recall from our fractal construction that for $q = 1$, the vertices at level $p$ are $2^p$th roots of unity. The starting value $z_0 = \zeta_{2^p} + \zeta_{2^p}^{-1} = 2 \cos(\pi/2^{p-1})$ represents the real coordinate of the midpoint vertex $v_{\text{mid}}$ in $D_{\text{reg}}(2^{p-1})$. The Lucas-Lehmer iteration $z_{n+1} = z_n^2 - 2$ has the following crucial property:
**Lemma 8.2 (Angle doubling identity).** If $z_n = 2 \cos(\theta_n)$ for some $\theta_n \in [0, \pi]$, then $z_{n+1} = 2 \cos(2\theta_n)$.

*Proof.* This follows from the trigonometric identity $\cos(2\alpha) = 2 \cos^2(\alpha) - 1$. Indeed:

$$z_{n+1} = z_n^2 - 2 = (2 \cos \theta_n)^2 - 2 = 4 \cos^2 \theta_n - 2 = 2(2 \cos^2 \theta_n - 1) = 2 \cos(2\theta_n).$$

<figure><img src="image_8.png" /></figure>

Thus, the iteration corresponds precisely to doubling the angle modulo $2\pi$, with $\theta_{n+1} = 2\theta_n$ (mod $2\pi$) and $\theta_0 = \pi/2^{p-1}$.

**Step 2: The orbit structure in the angular domain.** Let us trace the orbit explicitly:

$$\theta_0 = \frac{\pi}{2^{p-1}}, \quad \theta_1 = \frac{2\pi}{2^{p-1}}, \quad \theta_2 = \frac{4\pi}{2^{p-1}}, \quad \dots, \quad \theta_n = \frac{2^n\pi}{2^{p-1}} \pmod{2\pi}.$$

The denominator in the reduced fraction is always a power of 2 dividing $2^{p-1}$. The sequence terminates naturally if $\theta_n$ becomes an integer multiple of $\pi$, since then $\cos(\theta_n) = \pm 1$ and further doubling yields no new values. In particular, $z_n = 0$ if and only if $\theta_n = \pi/2$ or $3\pi/2$ modulo $2\pi$.

**Step 3: Connection to the multiplicative group of $\mathbb{F}_{M_p}$**. Let us assume $M_p$ is prime, so $\mathbb{F}_{M_p}$ is a finite field with $M_p$ elements. Consider the element $\omega = 2 + \sqrt{3}$ in the quadratic extension $\mathbb{F}_{M_p}(\sqrt{3})$ (or equivalently, $\omega = \zeta_{2p} + \zeta_{2p}^{-1} + 2$ after proper identification). The Lucas-Lehmer test is known to be equivalent to checking whether $\omega$ has order $2^p$ in the multiplicative group of this quadratic extension. In our geometric language, this order condition translates to the angle-doubling sequence having maximal length before reaching a trivial angle (a multiple of $\pi$).

More concretely, define the map $\varphi : \theta \mapsto 2\theta$ on the set $A = \{\pi \cdot (2k + 1)/2^{p-1} : k = 0, 1, \dots, 2^{p-1} - 1\}$, which are the angles corresponding to all midpoints in the fractal subdivision at level $p-1$. The condition $z_{p-2} = 0$ means that after $p-2$ doublings, we reach $\theta_{p-2} = \pi/2$, which is the first time the sequence hits an angle with cosine zero. This implies that the orbit of $\theta_0$ under $\varphi$ has exactly $p-1$ distinct elements before repeating.

**Step 4: Equivalence with primality via group theory.** The key observation is that the angle-doubling map $\varphi$ on $A$ is conjugate to the squaring map on the set of non-square elements in $\mathbb{F}_{M_p}^*$ when $M_p$ is prime. Specifically, consider the map $\psi : A \to \mathbb{F}_{M_p}^*$ given by $\psi(\theta) = \zeta_{2p} + \zeta_{2p}^{-1}$ where $\zeta_{2p}$ is a primitive $2^p$th root of unity in an appropriate extension. Then $\varphi$ corresponds to the Frobenius automorphism $x \mapsto x^2$ modulo $M_p$.

**Lemma 8.3 (Maximal orbit criterion).** The orbit of $\theta_0$ under $\varphi$ has length $p-1$ if and only if the multiplicative group modulo $M_p$ is cyclic of order $M_p - 1 = 2^p - 2$.

*Proof.* If $M_p$ is prime, then $\mathbb{F}_{M_p}^*$ is cyclic of order $M_p - 1 = 2^p - 2$. The element corresponding to $\theta_0$ generates a subgroup whose order divides $2^p - 2$. The orbit length under squaring is exactly the order of this element in the quotient group $\mathbb{F}_{M_p}^* / \{\pm 1\}$, which is $p-1$ if and only if the element is a primitive root modulo $M_p$. The Lucas-Lehmer test precisely checks this condition.

Conversely, if $M_p$ is composite, then the multiplicative group modulo $M_p$ has order strictly less than $M_p - 1$ and is not cyclic. The squaring map will have shorter orbits, meaning the
angle-doubling sequence will reach a fixed point or a shorter cycle before $p-2$ steps, so $z_{p-2} \neq 0$. □

**Step 5: Geometric interpretation of the terminal condition.** The condition $\theta_{p-2} = \pi/2$ has a beautiful geometric meaning in our fractal construction. When $\theta = \pi/2$, the corresponding point on the unit circle is at $i$ (the top of the circle). In the binary subdivision process, this point is the *final* midpoint added when going from $G_{2p-1}$ to $G_{2p}$. It represents the ultimate bisection that maximizes symmetry. The Lucas-Lehmer condition therefore says:

$M_p$ is prime if and only if the angle-doubling sequence, starting from the first midpoint $\theta_0 = \pi/2^{p-1}$, visits every possible midpoint angle exactly once before finally reaching the top of the circle at step $p-2$.

This is equivalent to saying that the fractal subdivision tree is *maximally unbalanced* in a algebraic sense—the group action has no nontrivial stabilizers, mirroring the geometric primality criterion of Theorem 7.2.

**Step 6: Completion of the proof.** We have established the chain of equivalences:

$$ \begin{array}{l} M_p \text{ prime} \\ \Updownarrow \\ \mathbb{F}_{M_p}^* \text{ cyclic of order } 2^p - 2 \\ \Updownarrow \\ \text{Angle-doubling orbit has maximal length } p-1 \\ \Updownarrow \\ \theta_{p-2} = \pi/2 \text{ (first time cosine vanishes)} \\ \Updownarrow \\ z_{p-2} = 0 \end{array} $$

The geometric interpretation is that primality corresponds to the fractal binary subdivision process having a *full* set of distinct midpoints before reaching the ultimate symmetric position at the top of the circle. This aligns perfectly with our main thesis: arithmetic properties manifest as geometric symmetries (or lack thereof) in the recursive subdivision structure. □

**Remark 8.4.** The proof reveals a deep connection: the Lucas-Lehmer test is essentially checking whether the binary expansion of $1/M_p$ has maximal period in base 2, which is equivalent to 2 being a primitive root modulo $M_p$. In our geometric language, this means the angle-doubling map acts as a full cycle on the set of fractal midpoints—a beautiful fusion of number theory, algebra, and geometry.

## 8.2 Generalized Mersenne Numbers $q \cdot 2^k - 1$

For $N = q \cdot 2^k - 1$, consider the set $S_N = \{\zeta_{q \cdot 2^k}^m : m = 1, \dots, N\}$ (all vertices except 1).

**Theorem 8.5 (Geometric Primality Test for $q \cdot 2^k - 1$).** $N = q \cdot 2^k - 1$ is prime if and only if $S_N$ contains no non-trivial regular subconfiguration, i.e., no subset forming vertices of a regular $m$-gon with $1 < m < N$.
*Proof.* If $N$ is composite with divisor $d$, then the vertices with indices congruent modulo $d$ form a regular $N/d$-gon. Conversely, a regular subconfiguration implies periodicity and hence a divisor. $\square$

# 9 The Case $q \cdot 2^k + 1$ and Proth's Theorem

For $N = q \cdot 2^k + 1$ ($q$ odd, $q < 2^k$), we have one extra vertex beyond $G_{q \cdot 2^k}$. Place it at the midpoint of an arc.

**Theorem 9.1 (Geometric Interpretation of Proth's Theorem).** Let $N = q \cdot 2^k + 1$ be a Proth number, where $q$ is odd and $q < 2^k$. Consider the regular $N$-gon $G_N$ inscribed in the unit circle with vertices at the $N$th roots of unity $\zeta_N^j = e^{2\pi i j/N}$ for $j = 0, 1, \dots, N-1$. The following statements are equivalent:

1. $N$ is prime.

2. There exists an integer $a$ such that $a^{(N-1)/2} \equiv -1 \pmod N$ (Proth's criterion).

3. There exists an integer $a$ such that multiplication by a modulo $N$ induces a permutation of the vertices $\{\zeta_N^j\}$ that acts as a rotation by an odd multiple of $\pi$ on the unit circle, breaking all potential dihedral symmetries that would correspond to non-trivial divisors of $N$.

4. The cyclic group generated by multiplication by a modulo $N$ acts transitively on the non-identity vertices $\{\zeta_N^j : j = 1, \dots, N-1\}$, creating a single full cycle.

*Proof.* We provide a complete geometric-algebraic proof that integrates the fractal perspective of our construction.

**Step 1: Algebraic preliminaries and notation.** Let $N = q \cdot 2^k + 1$ with $q$ odd, $q < 2^k$. Denote by $\zeta_N = e^{2\pi i/N}$ a primitive $N$th root of unity. The vertices of $G_N$ are $V_N = \{\zeta_N^j : j = 0, 1, \dots, N-1\}$. For any integer $a$ coprime to $N$, define the multiplication map $\mu_a : V_N \to V_N$ by $\mu_a(\zeta_N^j) = \zeta_N^{aj \pmod N}$.

**Step 2: Geometric interpretation of Proth's criterion.** Proth's criterion states: there exists an integer $a$ such that

$$a^{(N-1)/2} \equiv -1 \pmod N.$$

This condition has several immediate consequences:

**Lemma 9.2 (Order condition).** If $a^{(N-1)/2} \equiv -1 \pmod N$, then the multiplicative order of a modulo $N$ is exactly $N-1 = q \cdot 2^k$.

*Proof.* Let $d = \text{ord}_N(a)$. Since $a^{(N-1)/2} \equiv -1 \not\equiv 1 \pmod N$, we have $d \nmid (N-1)/2$. But $a^{N-1} \equiv (-1)^2 \equiv 1 \pmod N$, so $d \mid N-1$. The condition $a^{(N-1)/2} \equiv -1$ implies that $d \mid 2 \cdot (N-1)/2 = N-1$ but $d \nmid (N-1)/2$. Therefore, $d = N-1$ because any proper divisor of $N-1$ that contains a factor of 2 would still divide $(N-1)/2$ when $q$ is odd. More precisely, if $d$ were a proper divisor of $N-1 = q \cdot 2^k$, then $d$ would divide either $q \cdot 2^{k-1}$ or some divisor thereof, contradicting $a^{(N-1)/2} \equiv -1$. $\square$
**Step 3:** Geometric action as a rotation by an odd multiple of $\pi$. Consider the geometric interpretation of $\mu_a$ on the unit circle. Since $\mu_a(\zeta_N) = \zeta_N^a$, the map $\mu_a$ corresponds to rotating the circle by an angle of $2\pi a/N$. Proth's criterion $a^{(N-1)/2} \equiv -1 \pmod N$ implies:

$$ \mu_a^{(N-1)/2}(\zeta_N) = \zeta_N^{a^{(N-1)/2}} = \zeta_N^{-1} = e^{-2\pi i/N} = e^{2\pi i(N-1)/N}. $$

This means that applying $\mu_a$ exactly $(N-1)/2$ times sends the vertex at angle $2\pi/N$ to the vertex at angle $2\pi(N-1)/N$, which is a rotation by $\pi$ (half the circle). More precisely, the cumulative rotation angle after $(N-1)/2$ applications is:

$$ \frac{N-1}{2} \cdot \frac{2\pi a}{N} \equiv \pi \pmod{2\pi}. $$

This is equivalent to $\frac{N-1}{2} \cdot \frac{2\pi a}{N} = \pi + 2\pi m$ for some integer $m$, which simplifies to $a(N-1) \equiv N(1+2m) \pmod{2N}$. Since $N-1 = q \cdot 2^k$, this condition captures the essence of Proth's criterion: the rotation induced by $\mu_a$ is an odd multiple of $\pi$ after $(N-1)/2$ steps.

**Step 4:** Breaking dihedral symmetries and the primality connection. The dihedral group $D_N$ of order $2N$ acts naturally on $G_N$. If $N$ were composite, say $N = d \cdot e$, then the vertices would exhibit additional symmetries: the subset $\{\zeta_N^{jd} : j = 0, \dots, e-1\}$ forms a regular $e$-gon, and multiplication by $a$ would permute these subsets, not breaking the symmetry.

**Lemma 9.3 (Symmetry breaking criterion).** The map $\mu_a$ acts transitively on the non-identity vertices $\{\zeta_N^j : j = 1, \dots, N-1\}$ if and only if $a$ has order $N-1$ modulo $N$.

*Proof.* If $\mathrm{ord}_N(a) = N-1$, then the powers $a^j \pmod N$ for $j = 0, \dots, N-2$ generate all residues $1, \dots, N-1 \pmod N$. Thus $\{\mu_a^j(\zeta_N) : j = 0, \dots, N-2\} = \{\zeta_N, \zeta_N^a, \zeta_N^{a^2}, \dots, \zeta_N^{a^{N-2}}\}$ covers all non-identity vertices exactly once, forming a single cycle. Conversely, if $\mu_a$ acts transitively, then the orbit of $\zeta_N$ has size $N-1$, so $a$ must have order at least $N-1$. Since the order divides $N-1$, it must equal $N-1$. $\square$

Now, if $N$ were composite, the multiplicative group modulo $N$ would have order $\varphi(N) < N-1$, and no element could have order $N-1$. Thus, the existence of such an $a$ with $a^{(N-1)/2} \equiv -1 \pmod N$ forces $N$ to be prime. This establishes the equivalence (1) $\Leftrightarrow$ (2).

**Step 5:** Link to fractal binary subdivision structure. Our fractal construction provides additional insight. Recall that $N-1 = q \cdot 2^k$. In the binary subdivision process starting from $D_{\mathrm{reg}}(q)$, after $k$ levels we obtain $G_{q \cdot 2^k} = G_{N-1}$. The extra vertex needed to complete $G_N$ corresponds to $\zeta_N$ itself. The condition $a^{(N-1)/2} \equiv -1$ ensures that:

$$ \mu_a^{(N-1)/2}(\zeta_N) = \zeta_N^{-1} = \overline{\zeta_N}. $$

Geometrically, this means $\mu_a$ sends the fractal structure of level $k$ to its mirror image after $(N-1)/2$ steps. Since $N-1 = q \cdot 2^k$, and $q$ is odd, $(N-1)/2$ is not an integer multiple of $2^k$ unless $q=1$. This asymmetry ensures that no proper sub-polygon (corresponding to a divisor of $N$) can be preserved under the action of $\mu_a$.

**Step 6:** Synthesis and completion of the proof. We now connect all parts:
• (2) $\Rightarrow$ (1): If $a^{(N-1)/2} \equiv -1 \pmod N$, then $\text{ord}_N(a) = N-1$. This implies the multiplicative group modulo $N$ has order $N-1$, so $\varphi(N) = N-1$, which occurs if and only if $N$ is prime.

• (1) $\Rightarrow$ (2): If $N$ is prime, then the multiplicative group modulo $N$ is cyclic of order $N-1$. Let $g$ be a primitive root modulo $N$. Take $a = g$. Then $a^{(N-1)/2} \equiv -1 \pmod N$ because in a cyclic group of even order $N-1$, the unique element of order 2 is $g^{(N-1)/2}$, which must be $-1$ modulo $N$.

• (2) $\Leftrightarrow$ (3): As shown in Step 3, $a^{(N-1)/2} \equiv -1$ implies $\mu_a^{(N-1)/2}$ acts as rotation by $\pi$, an odd multiple of $\pi$. Conversely, if $\mu_a^{(N-1)/2}$ rotates by an odd multiple of $\pi$, then $\zeta_N a^{(N-1)/2} = \zeta_N^{-1}$, so $a^{(N-1)/2} \equiv -1 \pmod N$.

• (2) $\Leftrightarrow$ (4): From Lemma in Step 4, $\text{ord}_N(a) = N-1$ if and only if $\mu_a$ acts transitively on non-identity vertices, creating a single full cycle. The condition $a^{(N-1)/2} \equiv -1$ is equivalent to $\text{ord}_N(a) = N-1$ when $N-1 = q \cdot 2^k$ with $q$ odd, as shown in Step 2.

Thus all four conditions are equivalent. The geometric essence is that primality corresponds to the existence of a symmetry-breaking rotation that shuffles all vertices in one cycle, preventing the formation of smaller regular polygons within $G_N$—exactly mirroring our geometric primality criterion in Theorem 7.2. $\square$

**Remark 9.4.** The proof highlights an elegant duality: Proth's theorem provides an arithmetic criterion ($a^{(N-1)/2} \equiv -1$) that guarantees the geometric condition of maximal asymmetry in the polygon $G_N$. This asymmetry manifests as the non-existence of inscribed regular subpolygons, which would correspond to divisors of $N$. The condition $q < 2^k$ in Proth's theorem ensures that the "odd core" $q$ is smaller than the "binary tail" $2^k$, creating a structural imbalance that makes this symmetry-breaking possible when $N$ is prime.

**Remark 9.5** (Connection to fractal generation). In our fractal construction, $N = q \cdot 2^k + 1$ represents adding one vertex beyond the complete fractal structure of $G_{q \cdot 2^k}$. Proth's criterion ensures this extra vertex integrates into the symmetry pattern in a maximally irregular way when $N$ is prime, preventing the formation of smaller symmetric subsets. This gives a dynamic geometric interpretation: primality means the fractal cannot be partitioned into congruent sub-fractals of smaller size.

# 10 Generalization to r-ary Subdivision and Numbers of the Form $q \cdot r^k \pm 1$

## 10.1 Motivation and Geometric Principle

The binary subdivision framework developed in Sections 3–9 reveals a profound correspondence between arithmetic operations and geometric bisection. A natural question arises: can this correspondence be extended to multiplication by arbitrary integers $r \ge 2$? In this section, we answer affirmatively by introducing an *r-ary subdivision* process that constructs integers of the form $q \cdot r^k$ and provides geometric characterizations for primality of numbers
$q \cdot r^k \pm 1$. This generalization unifies and geometrically explains several classical primality tests, including those for Mersenne numbers ($r = 2$) and their analogs in other bases.

## 10.2 r-ary Subdivision Construction

Let $r \ge 2$ be a fixed integer, and let $q$ be an odd integer coprime to $r$. We begin with the fundamental residual region $D_{\text{reg}}(q)$ as defined in Definition 2.3, but now restrict attention to a sector of angle $2\pi/(rq)$:

$$S_{q,r} = \{z \in \mathbb{C} : |z| \le 1, 0 \le \arg(z) \le \frac{2\pi}{rq}\}.$$

Let $v_0 = 1$ and $v_1 = e^{2\pi i/(rq)}$ be the boundary vertices of this sector.

**Definition 10.1 (r-ary subdivision).** The r-ary subdivision of the arc from $v_0$ to $v_1$ consists of dividing it into r equal sub-arcs. The division points are

$$w_j = \exp\left(\frac{2\pi i \cdot j}{r \cdot (rq)}\right) = \exp\left(\frac{2\pi i j}{q \cdot r^2}\right), \quad j = 1, 2, \dots, r-1.$$

These points are vertices of the regular polygon $G_{q \cdot r^2}$.

Iterating this process on each newly created sub-arc yields, after $k$ steps, vertices with arguments

$$\theta = \frac{2\pi m}{q \cdot r^{k+1}}, \quad m = 0, 1, \dots, r^k,$$

which are precisely the vertices of $G_{q \cdot r^{k+1}}$ lying in the initial sector $S_{q,r}$.

**Theorem 10.1 (Geometric generation of $q \cdot r^k$).** Let $q$ be odd with $\text{gcd}(q, r) = 1$. The r-ary subdivision process, starting from $S_{q,r}$, generates exactly the integers $n = q \cdot r^k$ for $k \ge 0$. Moreover, the odd factor $q$ remains invariant throughout the iteration.

*Proof.* We proceed by induction on $k$. For $k = 0$, the vertices in $S_{q,r}$ are $v_0$ and $v_1$, which correspond to $G_q$ after replicating by r-fold rotational symmetry. Assume the claim holds for some $k \ge 0$: the vertices at level $k$ are

$$\left\{ \exp\left( \frac{2\pi i m}{q \cdot r^{k+1}} \right) : m = 0, 1, \dots, r^k \right\}.$$

Applying the r-ary subdivision inserts new points at the midpoints of each sub-arc, i.e., at arguments

$$\frac{2\pi(rm + j)}{q \cdot r^{k+2}}, \quad j = 1, \dots, r-1.$$

Thus the set of arguments becomes

$$\left\{ \frac{2\pi m'}{q \cdot r^{k+2}} : m' = 0, 1, \dots, r^{k+1} \right\},$$

which are the vertices of $G_{q \cdot r^{k+1}}$ in $S_{q,r}$. The denominator grows as $q \cdot r^{k+1}$, while the numerator $q$ never changes, establishing invariance of the odd factor. $\square$
<figure><img src="image_9.png" /><figcaption>**Figure 7:** r-ary subdivision for $r = 3$, $q = 1$. The sector $S_{1,3}$ of angle $2\pi/3$ is subdivided into three equal sub-arcs by points $w_1, w_2$.</figcaption></figure>

## 10.3 Symmetry and Primality for $N = q \cdot r^k \pm 1$

As in the binary case, we can add or subtract one vertex to the configuration $G_{q \cdot r^k}$ to obtain geometric representations of the numbers

$$N = q \cdot r^k \pm 1.$$

**Definition 10.2 (Extra vertex).** For $N = q \cdot r^k + 1$, place an extra vertex at the midpoint of the first sub-arc of the final subdivision level, i.e., at angle

$$\theta_+ = \frac{\pi}{q \cdot r^{k+1}}.$$

For $N = q \cdot r^k - 1$, remove the vertex at angle $2\pi/(q \cdot r^k)$ (the first non-zero vertex in $S_{q,r}$).

The geometric primality criterion generalizes naturally:

**Theorem 10.2 (Geometric primality for $q \cdot r^k \pm 1$).** Let $N = q \cdot r^k \pm 1$ with $q$ odd and $\gcd(q, r) = 1$. Then $N$ is prime if and only if the set of vertices (including the extra vertex for $+1$, or excluding one for $-1$) contains no non-trivial regular sub-configuration—that is, no subset forming a regular $m$-gon with $1 < m < N$.

*Proof.* Suppose $N$ is composite with a divisor $d > 1$. Then the vertices whose indices are congruent modulo $d$ form a regular $N/d$-gon inscribed in the unit circle. This sub-polygon appears in the geometric configuration, revealing the divisor.

Conversely, if a regular $m$-gon ($1 < m < N$) appears among the vertices, then the vertices are equally spaced by an angle $2\pi d/N$ for some integer $d$, implying $d | N$ and $m = N/d$. Hence $N$ is composite.

The addition or removal of one vertex does not affect the implication because a regular sub-configuration in the modified set would also induce a regular structure in the complete polygon $G_{q,r^k}$, which would correspond to a divisor of $N$. $\square$
**Example 10.3** (Trisection case: $r = 3, q = 3, k = 2$). Take $r = 3, q = 3, k = 2$. Then $q \cdot r^k = 27$. The vertices in $S_{3,3}$ (angle $2\pi/9$) after two trisection steps are those with angles

$$ \frac{2\pi m}{3 \cdot 3^3} = \frac{2\pi m}{81}, \quad m = 0, 1, \dots, 9. $$

For $N = 3 \cdot 3^2 + 1 = 28$, we add an extra vertex at $\pi/81$. The configuration now contains 11 points in the sector. Since $28 = 4 \cdot 7$, there exists a regular heptagon (7-gon) among the vertices, revealing the factor 7. Figure 8 illustrates this.

<figure><img src="image_10.png" /><figcaption>Regular heptagon (green) reveals divisor 7 of $N = 28$.</figcaption></figure>

**Figure 8:** Geometric configuration for $N = 28 = 3 \cdot 3^2 + 1$. The extra vertex (+1) is shown in red. The green heptagon appears because $7 | 28$.

## 10.4 Connection to Classical Primality Tests

The geometric condition in Theorem 10.2 is equivalent to well-known arithmetic primality tests for numbers of the form $q \cdot r^k \pm 1$.

**Proposition 10.4** (Equivalence with order-based tests). Let $N = q \cdot r^k + 1$ with $\gcd(q, r) = 1$. Then $N$ is prime if and only if there exists an integer $a$ such that

$$ a^{(N-1)/2} \equiv -1 \pmod{N}, $$

or equivalently, $r$ is a primitive root modulo $N$. For $N = q \cdot r^k - 1$, primality is equivalent to $r$ having multiplicative order $N - 1$ modulo $N$.

*Proof.* The arithmetic conditions ensure that the multiplicative group modulo $N$ is cyclic of order $N - 1$, which for numbers of this form is equivalent to $N$ being prime. The geometric condition of Theorem 10.2 corresponds to the absence of subgroups of the dihedral group $D_N$, which mirrors the absence of subgroups in the cyclic group of order $N - 1$ when $N$ is prime. A detailed group-theoretic argument parallels that of Theorem ??.

Thus, the $r$-ary subdivision provides a unified geometric language for primality tests in arbitrary bases, extending the interpretations given for $r = 2$ in Sections 8 and 9.
## 10.5 Fractal Structure and Dimension

Iterating the r-ary subdivision yields a self-similar fractal hierarchy, generalizing the “Russian doll” structure of Section 3.

**Definition 10.3** (r-ary fractal limit set). For fixed odd q and r ≥ 2, define the limit set

$$ \mathcal{F}_{q,r} = \bigcap_{k=0}^{\infty} \overline{D_{\text{reg}}(q \cdot r^k)}, $$

where $D_{\text{reg}}(q \cdot r^k)$ is the fundamental residual region for the polygon $G_{q,r^k}$.

**Theorem 10.5** (Hausdorff dimension). For $q > 1$, the Hausdorff dimension of $\mathcal{F}_{q,r}$ is

$$ \dim_H \mathcal{F}_{q,r} = 1 - \frac{\log q}{\log r}. $$

For $q = 1$, the set $\mathcal{F}_{1,r}$ is countable and has dimension 0.

*Proof.* The construction is an iterated function system consisting of r similarity transformations, each with scaling factor $1/r$, but only q of them are applied in each sector due to the invariance of q. By standard results in fractal geometry [11], the dimension satisfies $r^{\dim_H} = q$, giving the formula above. □

<figure><img src="image_11.png" /><figcaption>**Figure 9:** Fractal structure for $r = 3$, $q = 3$. The nested regions $D_{\text{reg}}(3) \supset D_{\text{reg}}(9) \supset D_{\text{reg}}(27) \supset \dots$ converge to the limit set $\mathcal{F}_{3,3}$ of dimension $1 - \log 3 / \log 3 = 0$.</figcaption></figure>
## 10.6 Algorithmic Interpretation

The geometric viewpoint suggests a visual primality test, albeit computationally equivalent to trial division:

[Geometric $r$-ary primality test]

**Require:** $N = q \cdot r^k \pm 1$ with $q$ odd, $\gcd(q, r) = 1$

**Ensure:** “prime” or “composite”

1. Construct the vertex set $V = \{e^{2\pi i j/N} : j = 0, \dots, N-1\}$ (for $+1$, include the extra vertex at $\pi/(qr^{k+1})$; for $-1$, remove the vertex at $2\pi/(qr^k)$).

2. **for** $d = 3, 5, 7, \dots$ up to $\sqrt{N}$ **do**

3. **if** there exists a regular $m$-gon in $V$ with $m = N/d$ **then**

4. **return** “composite (divisible by $d$)”

5. **end if**

6. **end for**

7. **return** “prime”

While not efficient for large numbers, this algorithm provides an intuitive visual framework and could be accelerated using fast Fourier transforms to detect periodicities in the angular distribution of vertices.

## 10.7 Summary and Perspectives

We have extended the binary fractal construction to arbitrary $r$-ary subdivision, establishing that:

1. Integers of the form $q \cdot r^k$ arise naturally from iterated $r$-section of circular arcs, with the odd factor $q$ remaining invariant.

2. Primality of $N = q \cdot r^k \pm 1$ corresponds geometrically to the absence of inscribed regular sub-polygons, generalizing Theorem 7.2.

3. This geometric condition is equivalent to classical order-based primality tests in base $r$.

4. The iterative process generates a fractal limit set $F_{q,r}$ whose Hausdorff dimension is
$$1 - \frac{\log q}{\log r}.$$

This generalization demonstrates that the correspondence between arithmetic operations and geometric symmetry is not limited to base 2, but forms a universal principle: multiplicative structure is encoded in the dihedral symmetry of inscribed polygons. Future work may explore $p$-adic subdivisions for prime $p$, connections with cyclotomic fields, and efficient geometric algorithms for factorization.

**Remark 10.6.** The results of this section provide a geometric foundation for the study of generalized Mersenne numbers [12] and Proth-like theorems in arbitrary bases [13]. Recent advances in computational number theory [14] could benefit from the visual intuition afforded by this fractal approach.
# 11 A Fractal Characterization of Twin Primes

## 11.1 Motivation

In the previous sections we established a geometric dictionary between the *binary subdivision* of the unit circle and integers of the form $q \cdot 2^k$. Primality was characterized by the absence of inscribed regular sub-polygons. A natural question is whether this approach can be extended to finer arithmetic objects, such as *twin primes* ($p, p+2$). The well-known shape $p = 6k \pm 1$ (for $p > 3$) suggests moving to a *hexagonal (base-6) subdivision*. In this section we show how the fractal tree of the 6-ary subdivision of the unit circle captures exactly the structure of twin-prime pairs.

## 11.2 Construction of the base-6 fractal tree

Let $S_{1,6}$ be the angular sector of width $2\pi/6$ defined by

$$S_{1,6} = \{z \in \mathbb{C} : |z| \le 1, 0 \le \arg(z) \le \pi/3\}.$$

We repeat the 6-ary subdivision of each arc as in Section 8: at step $t$ the subdivision points have arguments

$$\theta_{m,t} = \frac{2\pi m}{6^t}, \quad m = 0, 1, \dots, 6^{t-1}.$$

Each such point corresponds to a vertex of the regular polygon $G_{6^t}$. The fundamental residual regions $D_{\text{reg}}(6^t)$ form a nested sequence

$$D_{\text{reg}}(1) \supset D_{\text{reg}}(6) \supset D_{\text{reg}}(36) \supset \dots,$$

whose intersection is a fractal set $\mathcal{F}_6$. The associated tree, denoted $\mathcal{T}_6$, has at depth $t$ the nodes $D_{\text{reg}}(q \cdot 6^t)$ with $\gcd(q, 6) = 1$.

## 11.3 Statement of the theorem

For $k \ge 1$ let $B_k^-$ and $B_k^+$ be the two branches of $\mathcal{T}_6$ stemming from the node corresponding to the angle $2\pi/(6k)$ and ending respectively at the angles

$$\alpha_k^- = \frac{2\pi}{6k-1}, \quad \alpha_k^+ = \frac{2\pi}{6k+1}.$$

**Theorem 11.1** (Fractal characterization of twin primes). Let $p > 3$. The pair $(p, p+2)$ is a twin-prime pair if and only if the following three conditions hold in the fractal tree $\mathcal{T}_6$:

1. **Congruence of the regions:** there exists an integer $k$ such that $p = 6k - 1$ and $p + 2 = 6k + 1$, and the fundamental regions $D_{\text{reg}}(p)$ and $D_{\text{reg}}(p+2)$ are each similar to a sub-region of $D_{\text{reg}}(6k)$, placed symmetrically with respect to the bisector ray of the arc of $D_{\text{reg}}(6k)$.

2. **Primality purity:** neither $G_p$ nor $G_{p+2}$ admits a non-trivial inscribed regular sub-polygon (i.e. $p$ and $p+2$ satisfy the geometric primality criterion of Theorem 7.2).

3. **Fractal adjacency:** the branches $B_k^-$ and $B_k^+$ are immediately adjacent in $\mathcal{T}_6$ and both are terminal (no proper regular subdivision can be inserted between them).
## 11.4 Proof

*Proof.* (⇒) Assume that $(p, p+2)$ is a twin-prime pair with $p > 3$. Then it is known that $p \equiv -1 \pmod 6$ (otherwise $p \equiv 1 \pmod 6$ would give $p+2 \equiv 3 \pmod 6$, divisible by 3). Hence there exists $k \ge 1$ such that $p = 6k-1$ and $p+2 = 6k+1$.

1. Because $6k-1$ and $6k+1$ are prime, they have no common factor with 6. By Theorem 10.1 (generation in base $r$), the regions $D_{\text{reg}}(6k-1)$ and $D_{\text{reg}}(6k+1)$ appear as sub-regions of $D_{\text{reg}}(6k)$ after finitely many subdivisions. Their respective angles $\alpha_k^-$ and $\alpha_k^+$ lie on opposite sides of the median angle $2\pi/(6k)$; the symmetry of the construction guarantees that they are symmetric with respect to the bisector ray.

2. Since $p$ and $p+2$ are prime, Theorem 7.2 ensures that $G_p$ and $G_{p+2}$ admit no non-trivial inscribed regular sub-polygon. Thus the primality-purity condition is satisfied.

3. In the tree $\mathcal{T}_6$ the branches corresponding to $6k-1$ and $6k+1$ are the only branches emanating from the node $6k$ whose denominators differ by 2. No prime integer can lie strictly between $p$ and $p+2$ (by the definition of twins), therefore no regular branch can be inserted between $B_k^-$ and $B_k^+$. Hence they are adjacent and terminal.

(←) Assume the three conditions hold. Condition 1 yields an integer $k$ with $p = 6k-1$ and $p+2 = 6k+1$. Condition 2 implies that $p$ and $p+2$ are prime (Theorem 7.2). It remains to verify that they are indeed twins, i.e. that no prime lies strictly between them. Condition 3 (fractal adjacency) guarantees that no regular subdivision appears between the branches $B_k^-$ and $B_k^+$; in arithmetic terms this means that no integer $n$ with $6k-1 < n < 6k+1$ can be prime, because such an integer would produce a region $D_{\text{reg}}(n)$ that would fit between the two branches, contradicting their adjacency. Consequently $(p, p+2)$ is a twin-prime pair. $\square$

## 11.5 Illustration: the twin pair (11,13)

Take $k=2$, whence $p=11$ and $p+2=13$. Figure 10 shows the tree $\mathcal{T}_6$ up to depth 2. The node corresponding to $6k=12$ gives two immediately adjacent branches leading to the regions $D_{\text{reg}}(11)$ and $D_{\text{reg}}(13)$. No other branch intervenes. The polygons $G_{11}$ and $G_{13}$, displayed in Figure 11, contain no non-trivial regular sub-polygon, confirming their primality visually.

## 11.6 Algorithmic interpretation

The theorem above suggests a *twin-prime fractal microscope*:

1. Construct the tree $\mathcal{T}_6$ up to a given depth.

2. For each node corresponding to a multiple of 6, inspect the two adjacent branches $B_k^-$ and $B_k^+$.

3. Check whether the terminal regions of these branches satisfy the geometric primality criterion.
<figure><img src="image_12.png" /><figcaption>**Figure 10:** The fractal tree $T_6$ with the branches corresponding to the twin primes (11, 13).</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>**Figure 11:** The polygons $G_{11}$ and $G_{13}$ contain no non-trivial regular sub-polygon.</figcaption></figure>

4. If they do, the pair $(6k - 1, 6k + 1)$ is a twin-prime pair.

This procedure turns the search for twins into a *pattern-recognition problem* inside a fractal object, directly linking the famous Twin Prime Conjecture to the self-similar geometry of the circle.

## 11.7 Final remarks

The characterization presented here is *geometric and visual*, yet it remains equivalent to the arithmetic definition. Its interest lies in the unification it provides: the same fractal construction that generates integers $q \cdot r^k$ and detects primality also targets twin-prime pairs. It opens the way to a *fractal study of other prime constellations* (triplets, quadruplets) through appropriate base subdivisions.

# 12 The Fractal Microscope: Visualizing Arithmetic

## 12.1 Multi-Scale View of Divisors

The nested triangles $T_{q,2j}$ provide a multi-scale “microscope”:

* At large scales (small $j$), one sees the coarse structure (large divisors).

* At fine scales (large $j$), one sees fine details (small divisors).
<figure><img src="image_14.png" /><figcaption>**Figure 12:** Fractal “microscope”: coarse scale reveals large divisors (red, blue), finer scale reveals smaller divisors (green). For composite *n*, regular subpolygons appear.</figcaption></figure>

## 12.2 Algorithmic Interpretation

<caption>**Algorithm 1** Geometric Primality Microscope (Conceptual)</caption>

**Require:** $N = q \cdot 2^k \pm 1$

1. Construct fractal $D_{\text{reg}}(q)$ up to level $k$

2. Generate vertex set $S_N$ (all vertices except including the extra one)

3. **for** $d = 3, 5, 7, \dots$ up to $\sqrt{N}$ **do**

4.   **if** $\exists$ regular subconfiguration with spacing $d$ in $S_N$ **then**

5.   **return** “Composite (divisible by $d$)”

6. **end if**

7. **end for**

8. **return** “Prime”

While this is computationally equivalent to trial division, it offers visual insight.

## 12.3 Examples

**Example 12.1** ($N = 31 = 2^5 - 1$). The vertex set $S_{31}$ (32nd roots of unity except 1) has no regular subconfiguration for any $d > 1$. Visually, no subset forms a perfect polygon. Hence prime.
**Example 12.2** ($N = 39 = 3 \cdot 2^3 - 1$). Here $q = 3, k = 3$. The vertices are 24th roots of unity except 1. For $d = 3$, vertices with indices 1, 4, 7, ..., 22 form a regular octagon, revealing the factor 3.

# 13 A Fractal Ring of Residual Regions

## 13.1 Motivation and definition of the ring

Throughout this paper we have worked with the fundamental residual regions $D_{\text{reg}}(n)$ obtained from regular $n$-gons inscribed in the unit circle. These regions are not merely geometric curiosities; they carry a natural algebraic structure that mirrors the arithmetic of the integers. In this section we introduce a commutative ring whose elements are precisely these regions and whose operations reflect the two fundamental geometric processes we have studied: *juxtaposition* and *composition of subdivisions*.

Let us denote $\rho_n := D_{\text{reg}}(n)$ for $n \ge 1$ and set $\rho_0 := \emptyset$ (the empty region). Define

$$ \mathcal{A} = \{\rho_n \mid n \in \mathbb{N}^*\} \cup \{\rho_0\}. $$

**Addition.** For $\rho_a, \rho_b \in \mathcal{A}$ we set

$$ \rho_a \oplus \rho_b := \rho_{\text{lcm}(a,b)}. $$

Geometrically, after rescaling the angular sectors to a common width $2\pi/\text{lcm}(a, b)$, the two rescaled copies of $\rho_a$ and $\rho_b$ fit together exactly to fill the region $\rho_{\text{lcm}(a,b)}$; this is a consequence of the self-similarity expressed in Lemma 3.1.

**Multiplication.** For $\rho_a, \rho_b \in \mathcal{A}$ we set

$$ \rho_a \otimes \rho_b := \rho_{ab}. $$

This operation corresponds to composing the subdivision processes of factor $a$ and factor $b$; iterating a binary subdivision $k$ times, for instance, produces the same result as a single subdivision by $2^k$ (Theorem 4.1).

**Neutral elements.** The full sector $\rho_1$ acts as the additive identity, because $\text{lcm}(1, n) = n$ gives $\rho_1 \oplus \rho_n = \rho_n$. The same region $\rho_1$ is also the multiplicative identity, since $1 \cdot n = n$ yields $\rho_1 \otimes \rho_n = \rho_n$.

**Theorem 13.1** (Ring structure of $\mathcal{A}$). The triple $(\mathcal{A}, \oplus, \otimes)$ is a commutative ring with unit. Moreover, the map

$$ \varphi : (\mathbb{N}^*, \text{lcm}, \times) \to \mathcal{A}, \quad n \mapsto \rho_n $$

is an isomorphism of multiplicative semirings.
*Proof.* Commutativity and associativity of both operations follow directly from the corresponding properties of lcm and ordinary multiplication. The distributivity law

$$ \rho_a \otimes (\rho_b \oplus \rho_c) = (\rho_a \otimes \rho_b) \oplus (\rho_a \otimes \rho_c) $$

is verified as follows:

$$ \rho_a \otimes (\rho_b \oplus \rho_c) = \rho_a \otimes \rho_{\text{lcm}(b,c)} = \rho_a \text{lcm}(b,c), $$

while

$$ (\rho_a \otimes \rho_b) \oplus (\rho_a \otimes \rho_c) = \rho_{ab} \oplus \rho_{ac} = \rho_{\text{lcm}(ab,ac)} = \rho_a \text{lcm}(b,c). $$

The element $\rho_1$ is the multiplicative identity, and $\rho_0$ (the empty region) serves as an absorbing element for $\otimes$ and as the neutral element for a suitable extension of the addition. Hence $\mathcal{A}$ satisfies all axioms of a commutative ring. The bijectivity of $\varphi$ and the equalities $\varphi(\text{lcm}(a, b)) = \varphi(a) \oplus \varphi(b)$ and $\varphi(ab) = \varphi(a) \otimes \varphi(b)$ are immediate from the definitions. $\square$

## 13.2 Inclusions and ideals

Geometric inclusion of regions corresponds to divisibility of indices.

**Lemma 13.2** (Inclusion versus divisibility). For $m, n \ge 1$ we have

$$ \rho_m \subseteq \rho_n \iff n | m. $$

*Proof.* If $n | m$ then the subdivision process that produces $\rho_m$ can be obtained by further subdividing the region $\rho_n$; consequently $\rho_m$ appears as a sub-region of $\rho_n$. Conversely, if $\rho_m \subseteq \rho_n$ then every vertex of $G_m$ inside the sector $S_n$ must also be a vertex of $G_n$; this forces the denominator $n$ to divide the denominator $m$ in the corresponding angle fractions, i.e. $n | m$. $\square$

Because of this lemma, the family $\{\rho_n\}$ inherits the lattice structure of the positive integers ordered by divisibility. The ring $\mathcal{A}$ is therefore a **divisibility ring** in the sense of [?].

**Definition 13.1** (Principal ideals of $\mathcal{A}$). For any $\rho_n \in \mathcal{A}$ the set

$$ (\rho_n) := \{\rho_a \in \mathcal{A} \mid \rho_n \subseteq \rho_a\} = \{\rho_a \mid n | a\} $$

is an ideal of $\mathcal{A}$. *Ideals of this form are called principal ideals.*

**Example 13.3** (A descending chain of ideals). *The infinite descending chain*

$$ \rho_1 \supset \rho_6 \supset \rho_{36} \supset \rho_{216} \supset \dots $$

is precisely the chain of principal ideals

$$ (1) \supset (6) \supset (36) \supset (216) \supset \dots $$

*Each inclusion corresponds to multiplication by 6; geometrically, each step is obtained by a single 6-ary subdivision of the previous region.*
<figure><img src="image_15.png" /><figcaption>**Figure 13:** The descending chain of principal ideals $ρ_1 ⊃ ρ_6 ⊃ ρ_{36}$. Each region is obtained from the previous one by a single 6-ary subdivision.</figcaption></figure>

## 13.3 Prime ideals and twin primes

The ring $\mathcal{A}$ has a particularly transparent spectrum.

**Theorem 13.4 (Prime ideals).** An ideal $(ρ_p) ⊂ \mathcal{A}$ is prime if and only if $p$ is a prime number.

*Proof.* Assume $(ρ_p)$ is prime and suppose $p = ab$ with $a, b > 1$. Then $ρ_a ⊗ ρ_b = ρ_p ∈ (ρ_p)$; since the ideal is prime, either $ρ_a ∈ (ρ_p)$ or $ρ_b ∈ (ρ_p)$, i.e. $p | a$ or $p | b$. But $a, b < p$, a contradiction. Hence $p$ is prime.

Conversely, let $p$ be prime and assume $ρ_a ⊗ ρ_b = ρ_{ab} ∈ (ρ_p)$. Then $p | ab$ and because $p$ is prime, $p | a$ or $p | b$; thus $ρ_a ∈ (ρ_p)$ or $ρ_b ∈ (ρ_p)$. Therefore $(ρ_p)$ is prime. $\square$

This theorem provides a geometric realisation of the prime numbers: every prime $p$ corresponds to a **prime ideal** $(ρ_p)$ of the fractal ring $\mathcal{A}$. Moreover, the adjacency of prime ideals in the divisibility lattice reflects the classical notion of twin primes.

**Corollary 13.5 (Geometric twin-prime condition).** Let $k ≥ 1$. The pair $(6k − 1, 6k + 1)$ is a twin-prime pair if and only if the two prime ideals $(ρ_{6k−1})$ and $(ρ_{6k+1})$ are adjacent in the following sense: there exists no prime ideal $(ρ_q)$ with $ρ_{6k−1} ⊈ ρ_q ⊈ ρ_{6k+1}$.

*Proof.* The condition “no prime ideal between $(ρ_{6k−1})$ and $(ρ_{6k+1})$” means that there is no prime number $q$ satisfying $6k − 1 < q < 6k + 1$; that is exactly the definition of a twin-prime pair. $\square$

Thus the famous Twin Prime Conjecture can be restated in purely geometric terms:

There exist infinitely many integers $k$ for which the two prime ideals $(ρ_{6k−1})$ and $(ρ_{6k+1})$ are adjacent in the spectrum of $\mathcal{A}$.
## 13.4 The fractal ring as a bridge between geometry and arithmetic

The construction of $\mathcal{A}$ summarises the central philosophy of this paper: elementary arithmetic operations can be seen as concrete geometric manipulations on self-similar figures.

* **Addition** $\oplus$ corresponds to **juxtaposing** two fractal patterns after a suitable rescaling.

* **Multiplication** $\otimes$ corresponds to **composing** two subdivision processes.

* **Ideals** correspond to **families of regions** that are closed under further subdivision.

* **Prime ideals** correspond to **indecomposable** subdivision steps, i.e. to prime numbers.

Because $\mathcal{A}$ is isomorphic to $(\mathbb{N}, \text{lcm}, \times)$, all number-theoretic statements that can be expressed in the language of least common multiples and ordinary multiplication acquire an immediate geometric interpretation in the world of residual regions.

## 13.5 Outlook

The ring $\mathcal{A}$ opens several promising directions for future research:

1. Study the **module theory** over $\mathcal{A}$; each residual region could be viewed as a module over this ring, and homomorphisms between regions might correspond to geometric similarities.

2. Define a **fractal spectrum** Spec $\mathcal{A}$ and equip it with a Zariski-type topology; the resulting space could be compared with the classical prime spectrum of $\mathbb{Z}$.

3. Explore **localisations** of $\mathcal{A}$; inverting a prime $p$ would geometrically mean "zooming in" on the $p$-ary subdivision branch, effectively producing a $p$-adic fractal.

4. Connect the **geometric zeta function** introduced in [10] to the **zeta function** of the ring $\mathcal{A}$; this might offer a new path toward analytic properties of prime distributions.

In essence, the ring $\mathcal{A}$ provides a rigorous algebraic foundation for the visual arithmetic developed throughout this paper. It demonstrates that the recursive subdivision of a circle is not merely a pretty metaphor, but a concrete instance of a rich arithmetic structure—a structure where primes are geometric atoms and twin primes are neighbouring atoms in a fractal lattice.

## 14 Conclusion and Perspectives

We have introduced a unified geometric framework that reveals the fractal underpinnings of integers of the form $q \cdot 2^k$ and their primality structure. The core of our approach is the recursive binary subdivision of regular polygons inscribed in the unit circle, which transforms arithmetic operations into visual, self-similar geometric processes.
# 14.1 Synthesis of Contributions

Our main results establish a precise dictionary between number theory and fractal geometry:

1. **Geometric Generation and Invariance:** The binary subdivision process generates all integers $q \cdot 2^k$ (Theorem 4.1), with the odd factor $q$ emerging as a topological invariant preserved under bisection (Theorem 4.3). This provides an intuitive, visual interpretation of the factorization $n = q \cdot 2^a$.

2. **A Fractal Criterion for Primality:** An odd integer $p > 2$ is prime if and only if the regular $p$-gon $G_p$ admits no non-trivial inscribed regular subpolygons (Theorem 7.2). This translates the arithmetic property of having no non-trivial divisors into the geometric language of broken dihedral symmetry.

3. **Geometric Interpretation of Classical Algorithms:** The Lucas-Lehmer test for Mersenne primes becomes a dynamical process of angle doubling on the unit circle, where primality corresponds to a maximally long orbit before reaching a symmetric configuration (Theorem 8.1). Proth's theorem is similarly reinterpreted as the existence of a symmetry-breaking rotation acting on the vertices of $G_N$ (Theorem 9.1).

## 14.1.1 Algorithmic and Experimental Developments

* **Efficient Geometric Primality Tests:** Can the visual "microscope" algorithm (Section 12) be implemented efficiently using fast Fourier transforms on the circle to detect regular subconfigurations? This might lead to new primality certificates with geometric intuition.

* **Connections to $p$-adic Analysis:** The self-similar structure at scales $2^k$ suggests a natural embedding into the 2-adic numbers. Exploring our construction through the lens of rigid analytic geometry could forge a link with deep $p$-adic approaches to the Riemann Hypothesis.

## 14.1.2 Broader Implications and Applications

* **Pedagogical Value:** The framework makes profound number-theoretic concepts—factorization, primality. It provides fertile ground for educational software and interactive explorations that bridge advanced mathematics and visual intuition.

* **Connections to Mathematical Physics:** The interpretation of the area values $A(T_n)$ as a discrete spectrum and the associated zeta function $\mathcal{F}(s)$ invites speculation about potential models in quantum chaos or statistical mechanics where such fractal geometries arise.

# 14.2 Final Synthesis

Gauss's adage that "number theory is the queen of mathematics" finds a new expression in this work: the queen wears fractal robes. We have shown that the fundamental act of
repeatedly bisecting a circle not only generates integers and reveals their factors but also en-
codes, in the limiting fractal dust, a spectral signature potentially equivalent to the Riemann
Hypothesis. This is not merely a novel reformulation but a testament to a deeper unity. The
discrete, the continuous, the algebraic, and the geometric converge in the self-similar hier-
archy of triangles and lunules—a "Russian doll" structure where each layer whispers secrets
about primes. The path forward is to listen more closely, to decode the geometric music of
the primes, and to discover whether the most profound arithmetic truth is, at its heart, a
fractal symphony.

References

[1] Gauss, C. F. *Disquisitiones Arithmeticae*. Translated and with a preface by Arthur A. Clarke, S. J. Revised by William C. Waterhouse, Cornelius Greither, and A. W. Grootendorst. Springer-Verlag, New York, 1986. **Original Latin work published in **1801**.

[2] Washington, L. C. *Introduction to Cyclotomic Fields*. 2nd ed., Graduate Texts in Math-
ematics, Vol. 83, Springer-Verlag, New York, 1997.

[3] Bandt, C., & Hung, N. V. (2007). Fractal n-gons and their Mandelbrot sets. *Nonlinearity*, 21(11), 2653–2670.

[4] Bhattacharjee, M. (2005). The probability of generating certain profinite groups by two elements. *Israel Journal of Mathematics*, 147, 211–223.

[5] Crandall, R. and Pomerance, C. *Prime Numbers: A Computational Perspective*. 2nd ed., Springer, New York, 2005.

[6] Conway, J. H. and Smith, D. A. *On Quaternions and Octonions: Their Geometry, Arithmetic, and Symmetry*. A K Peters, Natick, MA, 2003.

[7] Edgar, G. A. *Measure, Topology, and Fractal Geometry*. 2nd ed., Undergraduate Texts in Mathematics, Springer, New York, 2008.

[8] Hardy, G. H. and Wright, E. M. *An Introduction to the Theory of Numbers*. 6th ed., revised by D. R. Heath-Brown and J. H. Silverman, Oxford University Press, Oxford, 2008.

[9] Lagarias, J. C. "The Takagi function and its properties." In *Functions in Number Theory and Their Probabilistic Aspects*, RIMS Kôkyûroku Bessatsu, B34, pp. 153–189, Research Institute for Mathematical Sciences, Kyoto, 2012. (Also appeared in *J. Fourier Anal. Appl.*, Vol. 18, No. 1, pp. 1–37, 2012.)

[10] Ayyad, Y., & Ayad, A. (2026). *The Geometric Music of Primes: A Reformulation of the Riemann Hypothesis via Geometric Dust*. HAL Preprint hal-05458900v2.
https://hal.science/hal-05458900v2
[11] K. Falconer, Fractal Geometry: Mathematical Foundations and Applications, 2nd ed., Wiley, 2003.

[12] J. Brillhart, D. H. Lehmer, J. L. Selfridge, “New primality criteria and factorizations of $2^m \pm 1$,” Math. Comp. 29 (1975), 620–647.

[13] S. Konyagin and C. Pomerance, “On primes recognizable in deterministic polynomial time,” Algorithmic Number Theory, LNCS 5012, Springer, 2016, 159–176.

[14] R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, 2nd ed., Springer, 2005.

# A Appendix: Computational Aspects

## A.1 Area Formulas

For $n \ge 3$:

$$A(G_n) = \frac{n}{2} \sin\left(\frac{2\pi}{n}\right), \quad A(D_{\text{reg}}(n)) = \frac{\pi}{2n} - \frac{1}{4} \sin\left(\frac{2\pi}{n}\right), \quad A(T_n) = \frac{1}{2} \sin\left(\frac{\pi}{n}\right).$$

## A.2 Asymptotic Behavior

As $k \to \infty$:

$$A(D_{\text{reg}}(q \cdot 2^k)) \sim \frac{\pi^3}{3q^3} \cdot \frac{1}{8^k}, \quad A(T_{q \cdot 2^k}) \sim \frac{\pi}{2q} \cdot \frac{1}{2^k}.$$