Manuscript Offprint
arXiv:2609.03896The Prime Clockwork: A Dynamic Representation of Modular and Multiplicative Arithmetic
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
The way numbers are represented strongly influences which arithmetic structures are easy to see. The prime clockwork is a recursively growing discrete dynamical system: a list of autonomous two-hand clocks driven by one common +1 signal. No primes or primality labels are supplied. Starting empty, the process appends a clock of period n whenever none already present rings; the primes are generated internally as its growth times. For each installed prime p, the seconds reading advances through , and each return to zero increments the minutes reading , which counts completed p-cycles. The hands use only increment, comparison, reset, and carry, without explicit mod or div operations.
At time , . The valuation readout is generated locally: it is zero when the -clock does not ring; when it rings, the readout is one plus the earlier valuation indexed by the current minutes reading. The valuation trajectory has no repeated row; this reconstructs each integer in unique prime-factorized form. Its coordinates add and subtract under multiplication and division, representing every positive rational uniquely; divisibility becomes weak componentwise order, and unique factorization is natural in this representation. Finite seconds arrays form Cartesian-product state spaces whose common orbit visits every joint state once before repeating; this grand cycle is the order-sensitive dynamical counterpart of the Chinese remainder theorem. The same coordinates expose gcd, lcm, perfect powers, B'ezout's identity, and Euler's totient. Rational valuation levels reach certain positive algebraic irrationalities, but not algebraic numbers in general.
Keywords. modular arithmetic; discrete dynamical systems; Chinese remainder theorem; prime generation; prime vectors; p-adic valuations; unique factorization; Euler totient; visual mathematics.
“We are not trying to meet some abstract production quota of definitions, theorems and proofs. The measure of our success is whether what we do enables people to understand and think more clearly and effectively about mathematics.”
—William P. Thurston, On Proof and Progress in Mathematics [12, p. 163]
1 Introduction
Elementary number theory is usually presented through several complementary languages: divisibility, congruences, prime factorization, arithmetic functions, and valuations. The prime clockwork asks whether these familiar structures can be organized in one prime-indexed representation before the usual algebraic machinery is brought fully into view.
The construction is intentionally elementary. It begins with no supplied primes and advances only by a common +1 signal. Whenever none of the existing clocks rings, the present integer becomes the period of a newly appended clock; the primes are therefore outputs of the recursion rather than parameters.
given to it. Each complete p-clock autonomously updates two hands without consulting any other prime clock: a cyclic seconds reading and an integer minutes reading that counts completed p-cycles. The p-adic valuation is a third, derived readout, computed at ring times from the minutes address and that clock's own earlier valuation history. Globally, however, unique factorization makes the complete valuation vector sufficient to recover the represented integer, every local clock state, and the unique successor state. Remark 14 separates this global determinacy from the direct local updateability of the maintained clock hands. This suggests the language of a discrete dynamical system: there are states, update maps, periods, return times, products of state spaces, hidden variables, and observable events such as a return to a distinguished position.
The motivation is fourfold. First, it is an exploration of number representation: changing coordinates can make different structures visible. Second, it is didactic: the aim is a visual and intuitive route into modular and multiplicative number theory. Third, the clock language suggests alternative proofs of classical facts by using cycles, counting, and state transitions. Fourth, the construction provides a modest bridge to discrete dynamical systems without replacing standard number-theoretic notation.
More specifically, the contribution is a single recursive description in which prime periods are generated rather than supplied, seconds and minutes states are advanced clock by clock without explicitly invoking mod or div, valuations are recovered by local history lookup, their rows are proved non-repeating by descent through minutes addresses, and their coordinates turn divisibility into weak componentwise order and division into subtraction.
The metaphor is kept literal. For each prime , the seconds counter advances one position per unit tick and resets after positions. Every reset carries one unit to the minutes counter, which records how many -cycles have been completed. The valuation is not the minutes reading itself: it is obtained from the ring event, the current minutes value, and the clock's previously generated valuation readings. The two hands form an autonomous successor system; the valuation is its history-dependent multiplicative observation. This distinction will remain in force throughout the paper.
The exposition proceeds from the basic construction to integers, then to rationals and a limited class of algebraic numbers. The closing sections collect what the representation makes visible and position the viewpoint relative to standard theory and earlier clock- and sieve-based expositions.
For an integer period , let have a seconds counter and an integer minutes counter . Starting from , one unit tick applies the carry update
A clock rings on the second branch, when its seconds counter returns to 0. Induction on n gives

one common tick; autonomous updates on 2, 3, 5, 7, 11, ...
Figure 1: The autonomous prime-clock array. The clocks 2, 3, 5, 7, 11, ... share a common time parameter, but each updates its seconds and minutes readings independently of the other prime clocks. Only the cyclic seconds hand is displayed; its completed turns are retained by the integer minutes counter.
The quotient and remainder notation describes the generated readings; the update (1) itself uses only increment, comparison, reset, and carry. Formally, the full prime-indexed seconds vector has the natural zero initial state
where advances every active seconds coordinate by one with its own carry rule. The online recursion below realizes this same trajectory lazily: a -clock is instantiated only when is discovered, in the state that it would have reached after running from time zero.
The multiplicative reading attached to a prime is the nonnegative integer
called the valuation readout. We write
The valuation trajectory is generated locally from the two clock hands. With for ,
Indeed, at a ring equation (2) gives , so ; away from a ring, and the valuation is zero. Since , the ring branch refers only to an earlier row. Each -clock can therefore store its own valuation history and, at a ring, read and add one. The +1 is applied to the value at the minutes address, not to the valuation at the preceding ring. Appendix A implements this local lookup directly.
For example, the 3-clock has the following selected ring states:
| n | 3 | 6 | 9 | 27 |
|---|---|---|---|---|
| (0,1) | (0,2) | (0,3) | (0,9) | |
| 0 | 0 | 1 | 2 | |
| 1 | 1 | 2 | 3 |
Thus minutes count completed turns in the ordinary clock sense, whereas valuations measure recursively nested divisibility by .
2.1 The unit-step recursion
The autonomous realization does not begin with a supplied list of primes. At positive time 1 no clocks are installed. To pass from time to time , apply the following deterministic update.
-
Advance the two hands. Apply (1) to every installed clock, carrying one unit to whenever returns to 0.
-
Grow the array. If and none of the installed seconds counters is at 0, install a new clock in state .
-
Generate valuations. Each active -clock sets from (5) using its own stored history; coordinates not yet installed are suppressed dynamically and are retrospectively 0 in the static valuation vector.
In compact form,
tick with carry inspect zero alarms grow if none rings read valuations.
(6)
This is the prime clockwork as a recursively growing discrete dynamical system. Each clock autonomously generates its paired seconds and minutes trajectory, and its local valuation history turns those two readings into the multiplicative depth . The clock hands are the maintained dynamical state; the valuation is the synchronized derived observation.
The first few steps make the distinction visible. Dots mean that a clock has not yet been installed in the online recursion. Soft gray shading is used only for prime rows, since these are precisely the growth events of the recursion.
Seconds trajectory
Valuation trajectory
Figure 2: The first fifteen positive integers as a recursively generated trajectory. Left: the finite cyclic seconds readings. Right: the derived nonnegative valuation readings. A newly discovered prime appears with clock state and valuation . Before installation its valuation coordinate is dynamically absent; in the completed static representation it is zero.
Lemma 1 (Every composite has a smaller prime factor). If is composite, then some prime is a factor of .
Proof. Among the factors of , choose the least. If were composite, say with , then would also divide , contradicting the minimality of . Hence is prime; since is composite, .
Proposition 2 (The recursion discovers exactly the primes). At time , the clockwork installs a new clock if and only if is prime.
Proof. Proceed by induction on . Assume that before time the installed periods are exactly the primes below . An installed -clock rings at time exactly when .
If is prime, no smaller installed prime divides it, so no seconds counter rings and is installed. If is composite, Lemma 1 gives a prime factor . By induction is already present, and its seconds counter rings at time ; hence no new clock is installed. The base case is immediate.
The first growth events are therefore
but this list is output, not input. The concise Common Lisp program in Appendix A implements this online growth rule.
3 Integers on the clockwork
For positive integers, the seconds counters display congruence and divisibility alarms, the minutes counters record completed prime cycles, and the derived valuation readouts display prime multiplicity. This section develops the main integer results in that order: first the finite product dynamics, then factorization, and finally elementary arithmetic in the valuation coordinates.
3.1 Grand cycles from Cartesian products
After finitely many growth events, suppose the discovered periods are . The state space of this finite stage is the Cartesian product
The common tick advances every component by one. Before interpreting these positions as residue classes, we can determine the orbit directly from the cyclic clock geometry. This is the “grand cycle” viewpoint developed informally in an earlier Mathematical Playground essay [8].
Lemma 3 (Nonzero rotation of a prime clock). Let p be prime. Repeatedly rotate a p-clock by a fixed nonzero number of positions. Starting from any position, the successive rotations visit all p positions exactly once before returning.
Proof. A fixed rotation is a bijection of the positions. Its repeated action partitions the positions into cycles. Every cycle has the same length . If applications return one position to itself, the same total rotation returns every position, and minimality gives the same first-return time throughout. Thus for some positive integer . The rotation is nontrivial, so ; since is prime, and .
Lemma 4 (Zero-product lemma on a prime clock). Let p be prime and let a, b be positive integers. If the p-clock rings after ab unit ticks, then it rings after a ticks or after b ticks.
Proof. Assume that the clock does not ring after a ticks. The position reached after those a ticks is therefore a nonzero rotation. Repeating this rotation b times reaches the same position as ab unit ticks. By Lemma 3, a nonzero rotation of the p-clock returns to 0 only after a complete block of p applications. Hence, if the clock is at 0 after b applications, the ordinary p-clock also rings after b unit ticks.
Definition 5 (Grand cycle). For a finite stage of the recursively grown clockwork, the grand cycle is the ordered orbit obtained by repeatedly applying the common unit tick to the Cartesian-product state (7).

Figure 3: The local cyclic fact used both for the grand-cycle construction and, later, for unique factorization. On the 7-clock a rotation by two positions gives the single orbit .
Theorem 6 (Grand Cycle). For discovered prime periods , the grand cycle has length
and visits every element of exactly once before returning.
Proof. We argue inductively over growth events. One prime clock is itself a single cycle, so the assertion holds for . Suppose the first clocks form one cycle of length and exhaust . When the next prime is discovered, attach its clock and observe the enlarged system in blocks of ticks. After every such block all old coordinates have returned to their starting positions. The new clock, however, has undergone the fixed rotation consisting of unit steps.
This rotation is nonzero; otherwise the -clock would ring after ticks. Repeated application of Lemma 4 would then force it to ring after some earlier prime , which is impossible because a -clock cannot complete a positive cycle in fewer than unit ticks. Lemma 3 therefore shows that the successive -tick blocks visit all positions of the new clock before returning. The enlarged first-return time is consequently .
The Cartesian product contains exactly states. No state can repeat before the first return. If two intermediate states agreed, reversibility of the common tick would give an earlier return to the initial state. Hence the orbit contains exactly as many distinct states as the whole Cartesian product and therefore visits every state once.
This proof uses no modular notation and no Chinese remainder theorem. It separates two elementary ingredients that are easy to see in the clock picture: Cartesian-product counting determines how many joint configurations exist, while the prime-clock rotation lemma determines how the new coordinate is threaded through the completed orbit of the old ones.
Corollary 7 (Counting nonzero configurations). In one grand cycle of , exactly
states have no clock at its zero position.
Proof. For each -clock there are choices other than zero. The admissible joint configurations form the Cartesian product of these nonzero position sets, so their number is the product of their cardinalities. Theorem 6 ensures that each such configuration occurs exactly once along the ordered orbit.
3.1.1 The modular and CRT interpretation
Once the positions of each discovered p-clock are labelled 0, 1, ..., p - 1, the state at integer time t is
The common tick is the familiar coordinatewise update
with each coordinate read on its own finite clock. Theorem 6 says, before any appeal to CRT, that this temporal orbit visits every possible residue tuple exactly once in steps.
The Chinese remainder theorem now identifies the same fact algebraically through the bijection
Thus the clockwork does not replace CRT. Rather, the grand-cycle proof constructs the finite orbit by recursion and counting, while CRT recognizes the resulting state space as a familiar product of residue rings.
Figure 1 displayed the same autonomous array before this algebraic interpretation was introduced. The dynamical statement is that the common tick orders the Cartesian product into one orbit; the CRT statement is that the same product is canonically a residue system modulo .
Remark 8 (State space versus trajectory). The Cartesian product is the set of possible joint states; the grand cycle is the ordered trajectory through that set. This distinction is useful because it turns a static simultaneous-congruence picture into a reversible finite dynamical system and makes return times, zero alarms, and sieve-like observables properties of an explicit orbit.
3.2 The valuation readout and factorization depth
The early trajectory in Figure 2 displays the valuations derived from the two clock hands. For a fixed prime p,
is the divisibility depth. Equivalently,
At n = 72, for example, 2, 4, 8 divide 72 while 16 does not, so ; similarly . Thus
The following additive law for the valuation readouts can be proved before invoking unique factorization.
Lemma 9 (Primewise additivity of the valuation readout). For every prime p and positive integers a, b,
Hence coordinatewise.
Proof. Put and . Then and , where neither nor makes the p-clock ring. Thus . If one further factor of divided , the p-clock would ring on . By Lemma 4 it would then ring on or on , contradicting the maximality of or . Therefore .
Remark 10 (Valuation as a derived readout). The integer minutes counter is part of the autonomous two-hand clock, whereas is obtained from (5). The tests could themselves be organized as another clock array, but that extra realization is unnecessary here. A ring, the current minutes address, and the clock's own valuation history are sufficient to generate the exponent depth.
The next subsection first proves that the valuation trajectory never revisits a row. Together with primewise additivity, this dynamical non-repetition reconstructs every integer from its valuation row and yields unique factorization.
3.3 Non-repetition and unique factorization from prime clocks
The grand-cycle construction supplied the local zero-product property of a prime clock, and Lemma 9 converted that property into coordinatewise additivity of the valuation readouts. Additivity now interacts with the temporal order of the unit-step trajectory. If a valuation row repeated, any positive coordinate would identify a prime clock ringing at both times, and its minutes readings would point to an earlier repeated pair.
Proposition 11 (Non-repetition of valuation rows). For positive integers n and m,
Thus the valuation trajectory has no repeated row.
Proof. The row at time 1 is . At every time , either an existing clock rings, in which case (5) gives a positive valuation coordinate, or no existing clock rings, in which case Proposition 2 installs the new -clock with . Hence the zero row never occurs again.
Suppose that a repeated row nevertheless exists, and choose with minimal and . The common row is nonzero, so choose a prime with
The p-clock rings at both times. By (2), its minutes readings
satisfy , , and . Since , Lemma 9 gives
Subtracting the same coordinate unit from the equal rows yields . This is an earlier repeated pair because , contradicting the minimal choice of . Therefore no valuation row repeats.
Theorem 12 (Fundamental theorem of arithmetic, clock form). Every integer is a product of primes, and that product is unique up to the order of its factors.
Proof. For any finite-support nonnegative vector , form the integer
For each prime , . Repeated application of Lemma 9 therefore gives
For a fixed positive integer , the row has finite support, since whenever . Taking in (16) gives
Both and n are integer times on the same trajectory, so Proposition 11 forces
This proves existence of a prime factorization directly from the valuation row. If also for a finite-support family of nonnegative integers , then additivity gives . Hence for every prime , proving uniqueness up to the order of the factors.
The local mathematical content remains classical: Lemma 4 is the clock form of Euclid's prime-product property. The organization of the proof is intrinsic to the trajectory. A hypothetical repeated valuation row descends, through a ringing clock's minutes address, to an earlier repeated row. Once non-repetition is known, synthesizing a prime product with the same row reconstructs the original integer time. No prior factorization of that integer is assumed.
3.3.1 The valuation readouts become intrinsic multiplicative coordinates
The proof above identifies the exponent of each prime in the unique factorization of with the derived readout . Hence
\left|V_{p}(n)=\nu_{p}(n)=\sum_{k\geq1}\mathbf{1}_{\{p^{k}|n\}},\qquad n=\prod_{p}p^{V_{p}(n)}. \tag{17}The valuation vector is therefore not merely an annotation: the trajectory and the synthesis map F give the bijection
The two clock hands are not needed to reconstruct the integer from this static representation; their role is dynamical and becomes important again when the integer is advanced additively.
3.3.2 Elementary arithmetic in prime coordinates
The following results are classical. Their interest here is how little remains to be proved once the exponent coordinates and residue dynamics are visible.
3.3.3 Divisibility, gcd, and lcm
For finite-support valuation vectors define the weak componentwise order
If and , unique factorization gives
Thus divisibility is simply the weak product order on the valuation coordinates. Moreover,
The identity then reduces in each prime coordinate to

Figure 4: In a two-prime slice, gcd and lcm are simply the lower-left and upper-right corners determined by the two exponent vectors.
3.3.4 Perfect powers and elementary root tests
If
then
Thus perfect squares occupy the even sublattice , cubes occupy , and so forth. The largest perfect-power exponent of is
The familiar irrationality of becomes a one-coordinate obstruction. If , then
Looking only at the 2-coordinate gives an even integer on the left and an odd integer on the right, impossible. Equivalently, the vector of 2 is not in the even lattice.
3.3.5 Euler's totient as a grand-cycle observable
Let
An integer time is coprime to n exactly when none of the clocks rings. Corollary 7 counts these states without using modular arithmetic. Among the P positions of one grand cycle, exactly
have no zero coordinate. Since P divides n, the same prime-clock pattern occurs exactly n/P times during the first n integer ticks. Hence
For a prime power this reduces at once to . The usual CRT interpretation remains available, but the count itself is already visible from the Cartesian-product grand cycle.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
Figure 5: The totient as a survival count on the ordered clockwork orbit. For the 2-, 3-, and 5-clocks, the eight green states avoid every zero alarm, so .
3.3.6 Bézout through valuation coordinates and clocks
The exponent layer first removes the common multiplicative content. Put
By (19), and have no positive prime coordinate in common, hence .
Now consider multiplication by on the residue clock modulo . If
then . Prime-exponent comparison and the absence of common prime factors imply . Thus multiplication by is injective on the finite set , hence bijective. Some residue therefore satisfies
So for an integer , and
Multiplying by yields
Remark 13 (Why the two layers cooperate). The valuation coordinates perform the multiplicative simplification by removing the coordinatewise minimum. The residue clock then supplies the inverse motion. Once the common prime factors are gone, multiplication by permutes the residue states, so one of the states is 1. The proof is elementary and classical; the framework makes the division of labor between factorization and congruence unusually explicit.
Remark 14 (Local non-closure and global reconstruction). For positive integers, represents uniquely. Under multiplication the valuation projection closes on itself,
so an observer who watches only the valuation coordinates does not need to see the clock hands. In this restricted multiplicative view the seconds and minutes readings are hidden variables. This should not be confused with autonomy of the prime clocks themselves. Under +1, each isolated clock updates its two hands directly by (1); its valuation readout is then obtained from those hands and its own earlier valuation history. The valuation coordinate alone is not a closed local state description for or for general additive evolution.
Taken together, however, the valuation readings contain sufficient global information. By Theorem 12, the finite-support vector determines uniquely. It therefore determines , every current pair , and the complete successor state, including all successor clock and valuation readings and whether a new clock is installed. Thus the hidden clock hands are reconstructible rather than lost.
This is global determinacy, not a coordinatewise local recurrence: reconstruction passes through the represented integer and may require factorizing its successor. Maintaining the two-hand states explicitly instead makes local on every clock and, more generally,
whereas no analogous coordinatewise update exists for . Thus the clock hands provide the directly updated dynamical variables, while the valuation vector is the sufficient static multiplicative representation.
4 From integers to rational numbers
Passing from positive integers to positive rationals extends the derived valuation coordinates rather than the elapsed-cycle minutes counters. Valuations become signed integers, while a seconds residue remains finite and is defined only when the denominator is invertible modulo the relevant prime.
4.1 Signed valuation vectors from integer pairs
The extension to positive rationals can be carried out entirely in the clockwork’s additive prime-vector logic, without taking division as a primitive operation. This is the clockwork reformulation of the prime-vector argument developed in [9]. Let and , with positive integer entries, be equivalent when
and denote the equivalence class of by . Define
If , then . Primewise additivity on integers gives
so . Thus the signed valuation vector is well defined.
The decisive uniqueness step is additive. Suppose two pair classes have the same signed valuation vector,
Then
and adding the same valuation vectors to both sides yields
Integer additivity identifies these as the valuation vectors of ad and cb. The already proved uniqueness of the integer valuation representation therefore gives ad = cb, which is precisely the equivalence relation . Thus rational uniqueness is obtained by addition and equality in prime-vector space, without quotient or product cancellation.
Surjectivity is equally coordinatewise. Given any finite-support integer vector , split it into its nonnegative parts,
By the positive-integer representation theorem there are unique positive integers A and B with and . Then . Hence
and multiplication of positive rationals corresponds exactly to addition of signed valuation vectors.
Thus positive rationals, like positive integers, are uniquely represented by the valuation coordinates. If one observes only these coordinates during multiplication, the clock hands are hidden variables of the multiplicative projection. They remain essential to the direct unit-step clockwork on integers. Because the signed vector determines the rational number, the corresponding finite seconds residues remain reconstructible wherever they are defined.
Remark 15 (What is, and is not, being claimed). The theorem is classical. The prime-clock zero-product lemma carries the same mathematical content as Euclid's prime-product property, while the valuation readouts convert that local fact into additive prime coordinates. Alternative proofs of the fundamental theorem of arithmetic have a substantial history [11]. No priority claim is made for this formulation. Its role here is expository: the uniqueness step is carried out inside the prime clockwork by equality and subtraction of valuation vectors, rather than by reverting to ordinary product cancellation.
4.2 Backward and rational-step motion of the seconds counters
Autonomy makes every finite seconds counter reversible. The update on has inverse .
The seconds counters can also be parameterized by rational arithmetic steps. Let
If , then is invertible modulo , and one step of size on the -seconds counter is the permutation
Thus an autonomous prime clock can run forward, backward, or through an admissible rational arithmetic step while its seconds counter remains in the finite state space .
The same construction assigns residue states to many positive rationals. For
with , define
For example, on the 7-clock,
The restriction is essential. The rational number 1/2 has a residue on every odd prime clock but not on the 2-clock. Whenever the relevant residues exist, the seconds state also carries addition locally:
Thus the same hidden seconds variables that support successor dynamics on integers continue to carry additive information for rationals on every admissible prime clock.
The valuation coordinates record the same obstruction from the multiplicative side. If is reduced, then
and therefore
This is exactly the condition under which the finite p-residue is unavailable.
Remark 16 (Two meanings of a rational movement). Rational phase motion concerns the finite seconds counter and is a modular permutation available when the denominator is prime to p. Rational valuation levels, introduced later, are different: they interpolate the multiplicative exponent and allow values such as 1/2 or 2/3. They are not elapsed-cycle minutes readings.
4.3 Valuation vectors for rational numbers
For positive integers the valuation readout attached to prime p is
Collect these readouts into
For this is the vector of nonnegative integer valuation readings of the prime clockwork and, by unique factorization, a unique representation of .
For positive rationals, define . The valuation coordinates then take signed integer values, and unique factorization gives
with a unique finite-support vector. In particular,
This is coordinatewise independence in multiplicative form: for each fixed prime , the valuation changes independently of all other prime coordinates.
Thus
For instance,
while
Remark 17 (Clock hands versus valuation coordinates). The minutes counter belongs to the unit-step clock and counts completed p-cycles; the valuation is its history-dependent multiplicative readout. Under multiplication the valuation coordinates are independent, while under +1 the two clock hands update directly by carry. Keeping these roles separate prevents elapsed cycles from being confused with prime-exponent depth.
5 Algebraic numbers
The valuation coordinates permit one further elementary extension. Allowing rational rather than integer exponent levels reaches a nontrivial class of positive algebraic irrationalities. This is an extension of the multiplicative coordinates, not a continuous interpolation of either clock hand.
5.1 Rational valuation levels
For positive integers the valuation coordinates take nonnegative integer values, and for positive rationals they take signed integer values. A further interpolation is obtained by allowing rational rather than integer levels in these coordinates. These rational valuation levels are algebraically rational prime exponents; they are not states of the unit-step clock hands. This already reaches certain positive irrational algebraic numbers, although not all of them. Define
(33) where the positive real value of each rational power is used. For , write
Then
Powers scale every valuation coordinate, while roots divide every coordinate.
Proposition 18 (Exact scope of the rational-exponent representation). For ,
Moreover, the rational exponent vector of x is unique.
Proof. If , choose divisible by the finitely many denominators of the . Then has integer prime exponents and is a positive rational. Conversely, if , write and take the positive th root to obtain . For uniqueness, if , clear all denominators with a common ; unique prime factorization of the resulting rational identity forces every , hence every , to vanish.
Thus
and
Every positive rational root of a positive rational is represented in this way. Thus the rational-step extension includes a nontrivial class of irrational algebraic numbers, while Section 5.2 shows that it does not include all algebraic numbers.
2-exponent coordinate
half-step

Figure 6: Fractional prime exponents refine the exponent coordinate itself. Adjacent half-levels differ by multiplication by , while the finite residue clocks are not subdivided.
5.2 A natural boundary
The class G is multiplicatively rich, but it is not closed under addition. This is not a technical inconvenience; it is the simplest precise boundary of the prime-exponent representation.
Proposition 19. Neither nor the golden ratio
belongs to G.
Proof. Let . If , Proposition 18 gives for some . Applying the conjugation would then give
But while , so the two sides have different absolute values. This is impossible. For , its conjugate is
If , conjugation would force . Again and , a contradiction.
Remark 20 (Natural boundary). This paper stops here deliberately. One can enlarge the ambient algebraic machinery using number fields, prime ideals, units, places, and related constructions, but that requires additional structure. In its elementary form, the second layer of the prime clockwork is the rational extension of the prime-indexed valuation coordinates . It linearizes multiplication, division, powers, and roots of prime-radical monomials. Ordinary addition is not turned into coordinatewise motion. The failure of and to fit into one rational prime-exponent state is therefore an informative boundary of the representation.
6 What the clockwork reveals
The value of the representation is easiest to assess by comparing the structures that become adjacent in it. The same prime-indexed organization contains recursion, finite-state dynamics, modular phase, multiplicative depth, and counting observables. Standard theorems remain standard; the difference lies in their order of appearance and in the transitions between them.
The prime clockwork can be summarized as a recursively grown array of autonomous two-hand clocks. Their maintained state is
where seconds advance cyclically and each completed p-cycle carries one unit to minutes. Starting from the zero state, the common unit tick generates these trajectories, triggers new-clock growth, and produces at every finite stage one grand cycle through the Cartesian product of the seconds state spaces.
The multiplicative reading
is the representational layer. At integer times it is generated by the same p-clock from a ring, the current minutes address, and local valuation history. For positive integers the finite-support nonnegative vector is unique; for positive rationals its signed extension is unique. Under multiplication each coordinate evolves independently by . If only the valuation vector is watched, the two clock hands are hidden variables of this multiplicative projection. They remain reconstructible from the represented global state, but maintaining them makes local unit-step evolution immediate and avoids reconstructing and refactorizing the integer at every additive step.
Several consequences become concise in this language. Prime periods are generated growth events rather than an a priori parameter list, and the online construction uses successor, comparison, zero tests, carry, and lookup rather than explicit mod or div. Divisibility is the weak componentwise order on valuation vectors, division is coordinatewise subtraction, gcd and lcm are componentwise minimum and maximum, and perfect powers form sublattices. Euler's totient counts grand-cycle states that avoid the zero alarms of the primes dividing n, while Bézout combines coordinatewise removal of common valuation content with inverse motion in the residue layer. Finally, rational valuation levels represent exactly the positive reals for which some positive integer power is rational.
None of these statements is intended as a new theorem. The proposal is that their order and common prime-indexed organization may be mathematically and pedagogically useful. The same language passes from prime discovery to finite product dynamics, from product dynamics to modular arithmetic, and from prime exponents to a controlled rational extension. This may provide a modest bridge between elementary number theory, visual reasoning, and discrete dynamical systems.
7 Further perspectives
The prime clockwork should not be read as a claim that clocks, congruences, valuations, or the underlying number-theoretic theorems are new. The question is whether their particular synthesis produces a useful expository and proof language. The recursive emergence of prime periods, the proof of the grand cycle before invoking the Chinese remainder theorem, the paired seconds/minutes readings, and the controlled extension from integer to signed and rational valuation coordinates are the aspects on which that claim rests.
Several components of the present exposition were developed previously in the author's Mathematical Playground essays. Prime-vector notation for integers and positive rationals was introduced as a positional representation based on prime exponents [7, 9]; the latter essay emphasized the bijection between positive rationals and finite-support integer prime vectors and gave an earlier uniqueness argument. The recursive addition of prime clocks, long recurring clock patterns, Cartesian-product counting, and a complex-plane visualization were explored informally in “Grand Cycles of the Primes” [8]. A later LISP note implemented online prime detection by autonomous counters using increment and comparison as the arithmetic operations [10]. The present manuscript reorganizes these exploratory notes around the self-growing discrete dynamical system. Proposition 2 makes prime emergence explicit, Theorem 6 proves the grand cycle before invoking CRT, equations (1) and (5) separate the autonomous clock motion from its derived exponent readout, and Section 3.3 derives unique factorization from non-repetition of the valuation trajectory.
Clock representations of congruences are standard expository devices. Wilson’s introductory number-theory text includes a chapter explicitly organized around “congruences, clocks, and calendars” [13]. More specifically, Perucca’s Chinese Remainder Clock gives an analog multi-hand clock and develops the CRT in terms of rotations [5]. The present clock layer is therefore not claimed as a new visualization of the CRT.
Cyclic sieve constructions also organize residue classes. Pritchard's work Explaining the wheel sieve develops a mathematical framework for such a cyclic sieve [6]; Holt and Rudd study cycles of gaps generated through stages of Eratosthenes' sieve and explicitly discuss a dynamical system underlying their recursion [4]. These works are closer to sieving and gap structure than to the paired residue/valuation representation used here.
Alternative proofs of the fundamental theorem of arithmetic are themselves a well-developed subject; Dawson surveys several and discusses why alternative proofs may be mathematically useful even when the theorem is classical [11]. Section 3.3 should be read in that spirit. Its local prime-clock product lemma is equivalent in substance to the classical prime-product property, but it is derived from the cycle structure of a prime-period rotation inside a Cartesian product of autonomous prime clocks. The local clock law yields additivity of the valuation readouts. A minimal-repetition argument then descends through a ringing clock's minutes address, cancelling one valuation-coordinate unit and producing an impossible earlier repetition. Reconstruction from the resulting injective trajectory gives unique factorization. No priority claim is made for this formulation; its role is to connect a classical theorem directly to the representation used throughout the paper.
The exponent identities
and the coordinate descriptions of divisibility, gcd, lcm, and perfect powers are direct consequences of unique factorization and the standard additive valuation; see, for example, classical number-theory texts such as Apostol [2] and Hardy–Wright [3].
The intended distinction of the prime clockwork is one of synthesis, emphasis, and order of presentation. The construction is introduced explicitly as a recursive discrete trajectory: the common unit step drives each clock's autonomous seconds motion and carry into completed-cycle minutes, the absence of a zero alarm creates a new prime period without prior information about the primes, and the resulting growth times are exactly the primes. Each finite seconds stage is then treated as a Cartesian-product dynamical system whose grand cycle is proved before CRT is invoked. At ring times, the minutes reading addresses the clock's earlier valuation history, generating the prime-exponent depth. The valuation rows are shown not to repeat by descent through these minutes addresses, and unique factorization follows by reconstructing the integer time from its row. Signed valuation coordinates turn multiplicative composition and inversion into forward and backward coordinate motion. In that multiplicative projection both clock hands are hidden, but retaining them makes local +1 evolution immediate. Rational valuation levels then show how far the prime-indexed representation reaches into algebraic irrationality before ordinary addition leaves the model.
There are several directions one could pursue further. Richer algebraic number fields would require prime ideals, units, and additional local data, and the ordered grand cycles invite comparison with more general finite dynamical systems. A particularly natural question is whether the prime clocks, and the prime clockwork assembled from them, admit a useful continuous counterpart. Appendix B introduces a distinguished unit clock whose positive-real crossings mark the integer events and embeds each discovered prime seconds clock by a complex exponential. In this continuous picture a new prime is signalled when the unit clock reaches an integer event while none of the previously installed prime clocks lies on its positive real reference ray. This is the continuous event-detection counterpart of the discrete growth rule. It remains open here whether the embedding leads to useful continuous analogues of grand cycles, clockwork observables, or related dynamical structures. These extensions are deliberately not developed here. The present paper is intended to isolate the elementary core and its natural boundary.
The contribution is therefore best viewed as representational and organizational rather than as a collection of new number-theoretic theorems. Its intended use is in visual and intuitive number theory, in the search for alternative proofs and explanations, and as a possible entry point from elementary modular arithmetic into dynamical-systems language.
The author hopes that, rather than literally reinventing the wheel, the prime clockwork contributes a useful new perspective from which to view the modular structure of integers, rationals, and algebraic numbers, and to formulate aspects of the corresponding theory in a more intuitive way.
Acknowledgements
The author thanks Mutlu Özdemir for discussions on the prime clockwork and related ideas.
Tool and computational resource disclosure
Following the Leiden Declaration [1], the author discloses the use of OpenAI's ChatGPT for language editing and as an auxiliary check for possible gaps or inconsistencies in mathematical arguments. It was neither treated as an author nor relied upon as a mathematical authority. The author verified the arguments and references and assumes full responsibility for the manuscript and any remaining errors.
License. This manuscript is intended for release under the Creative Commons Attribution 4.0 International license (CC BY 4.0).
A A compact executable form of the prime clockwork
Python implementation. Two-hand clocks and their valuation readouts.
""Compact division-free prime clockwork."" def advance(r, m, p): return (0, m + 1) if r + 1 == p else (r + 1, m)
def clockwork(N): P, seconds, minutes, history = [], {}}, {}}, {} rows = [(1, (), (), [])] for n in range(2, N + 1): for p in P: seconds[p], minutes[p] = advance( seconds[p], minutes[p], p) if all(seconds[p] != 0 for p in P): P.append(n) seconds[n], minutes[n], history[n] = 0, 1, {} V = {} for p in P: V[p] = (0 if seconds[p] else 1 + history[p].get(minutes[p], 0)) history[p][n] = V[p] residues = tuple((p, seconds[p]) for p in P) cycles = tuple((p, minutes[p]) for p in P) factors = tuple((p, V[p]) for p in P if V[p]) rows.append((n, residues, cycles, factors)) return tuple(P), rows
if name == "main": print(clockwork(15))
Walkthrough. Each loop is one unit step. Every installed clock advances its seconds hand and carries one unit to its minutes hand on returning to zero. If none rings, the current integer is installed as a new period in state (0, 1). At a ring, the minutes reading addresses that clock's own valuation history and (5) adds one; away from a ring the valuation is zero. The program contains neither a remainder nor a division operator. Its output generates the primes, all active seconds and minutes readings, and the nonzero valuation coordinates of the factorization.
Common Lisp implementation. The minimal online prime-clock process.
(let ((cs nil) (n 2)) (labels ((composite-p () (some (lambda (c) (zerop (cdr c))) cs)) (tick () (dolist (c cs) (incf (cdr c)) (when (= (cdr c) (car c)) (setf (cdr c) 0)))) (loop (if (composite-p) (progn (tick) (incf n)) (progn (print n) (push (cons n 0) cs) (tick) (incf n))))
Walkthrough. cs stores the discovered clocks. composite-p tests for a zero hand, tick advances and resets, and push installs the new clock when none rings [10].
Figure 7: Two executable views of the prime clockwork. The Common Lisp source isolates online prime discovery. The Python source advances both clock hands and generates the valuation readout from each clock’s minutes address and local history.
B Complex-exponential picture of the seconds counters
A natural starting point for asking about a continuous counterpart of the prime clocks is the complex exponential. The continuous picture has one distinguished component that is not itself a prime clock: the unit clock
Its crossings of the positive real reference point occur exactly at the integer times. The unit clock therefore supplies the event times at which the recursive prime clockwork inspects the already installed prime clocks.
For each discovered prime p, embed the maintained seconds counter continuously by
At an integer time n, the point records the same cyclic state as and
Thus, for , the recursive prime-discovery condition has the continuous event form
After this event the new n-clock is installed at its own positive-real reference point. In other words, the discrete rule “grow when no clock rings” becomes an absence-of-synchronization test among autonomous continuous rotations sampled whenever the unit clock completes a turn.
Differentiation gives
Thus, if the radius is chosen proportional to the period, all prime-clock points have the same tangential speed while larger prime clocks have lower angular velocity.
Figure 8 juxtaposes the planar event picture with its lifted simultaneous-state realization.
Remark 21 (Continuous visualization of the maintained cyclic layer). The complex exponential interpolates only the seconds motion. Its completed turns correspond to the integer minutes reading . Neither the cone nor the ribbon displays the valuation . At an integer ring, is recovered from the current minutes address and the clock's own valuation history by (5). Thus the continuous picture visualizes the cyclic part of the autonomous two-hand update without conflating elapsed cycles with prime-exponent depth.
(a) n = 30
(b) n = 31

(c) n = 30

(d) n = 31


Figure 8: Continuous complex-exponential realization of the maintained seconds layer. (a)–(b) The planar views show the integer events and . The orange unit clock marks the integer sampling event. Filled dark-blue discs lie on the positive-real reference ray and open dark-blue discs lie away from it. Thus the filled prime discs in (a) record exactly the prime divisors of 30, whereas in (b) no previously installed prime clock rings and the new clock is installed. (c)–(d) For , let . The lifted point lies on the transparent ambient cone , and its prime-height section satisfies . The faint ribbon swept from to records one integer step. At the filled beads at lie on the positive-real generator, exactly recording the prime divisors of 30. At no earlier prime bead is aligned, and the new section is installed. Open beads show the remaining prime-clock phases. The cone and ribbon visualize the continuous seconds dynamics. Completed turns belong to the minutes counters; the valuation readouts are not an additional geometric layer.
C A portrait run for integers 1 through 30
Table 1 shows the factorized output. Each prime column records the valuation readout . Soft gray rows are reserved for primes; they mark growth events of the recursion. At such a time no previously installed prime clock rings, so a new clock is created and its prime coordinate appears for the first time.
Table 1: Prime-exponent output for . Soft gray rows mark newly encountered primes.
| n factorized form | 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29 |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 5 5 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 6 2·3 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 7 7 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 10 2·5 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 11 11 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 13 13 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 14 2·7 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 15 3·5 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 17 17 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 19 19 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 21 3·7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 22 2·11 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 23 23 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 26 2·13 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | |
| 29 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 30 2·3·5 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Table 2 gives the simultaneous residue-clock state for the same run. For compact comparison, all prime columns through 29 are displayed in every row, even before the corresponding clock would have been installed by the dynamic recursion. At time , only columns with are active. Reading across an active part of a row gives the joint state at time ; reading down a column shows one autonomous prime clock. Every soft gray row is a growth event. Among the clocks active just before that row, none rings, and the newly created clock begins at zero.
Table 2: Prime-residue states for . A zero is a ring of that prime clock; soft gray rows mark newly encountered primes.
References
[1] Leiden Declaration Working Group, “Leiden Declaration on Artificial Intelligence and Mathematics,” 2 June 2026. doi: 10.5281/zenodo.20302944.
[2] T. M. Apostol, Introduction to Analytic Number Theory, Undergraduate Texts in Mathematics, Springer, New York, 1976. doi: 10.1007/978-1-4757-5579-4.
[3] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., revised by D. R. Heath-Brown and J. H. Silverman, Oxford University Press, Oxford, 2008.
[4] F. B. Holt and H. Rudd, “Eratosthenes sieve and the gaps between primes,” arXiv:1408.6002 [math.NT], 2014. https://arxiv.org/abs/1408.6002.
[5] A. Perucca, “The Chinese Remainder Clock,” College Mathematics Journal 48 (2017), no. 2, 82–89. doi: 10.4169/college.math.j.48.2.82.
[6] P. Pritchard, “Explaining the wheel sieve,” Acta Informatica 17 (1982), no. 4, 477–485. doi: 10.1007/BF00264164.
[7] M. T. M. Emmerich, “Playing with Primes: A Positional Notation of Integers and Rationalers Based on Prime Factorization,” Mathematical Playground, 29 July 2024. https://emmerix.net/2024/07/29/playing-with-primes/.
[8] M. T. M. Emmerich, “Grand Cycles of the Primes: On Periodic Patterns in the Prime Clockwork,” Mathematical Playground, 15 September 2024. https://emmerix.net/2024/09/15/grand-cycles-of-the-primes/.
[9] M. T. M. Emmerich, “On Prime Vectors and Unique Factorization of Rationalers,” Mathematical Playground, 12 January 2025. https://emmerix.net/2025/01/12/on-prime-vectors-and-unique-factorization-of-rationals/.
[10] M. T. M. Emmerich, “Elegant Addition-only Prime Generation in LISP,” Mathematical Playground, 26 October 2025. https://emmerix.net/2025/10/26/elegant-addition-only-prime-generation-in-lisp/.
[11] J. W. Dawson, Jr., Why Prove It Again? Alternative Proofs in Mathematical Practice, Birkhäuser/Springer, Cham, 2015, especially Chapter 6, pp. 41–49. doi: 10.1007/978-3-319-17368-9.
[12] W. P. Thurston, “On proof and progress in mathematics,” Bulletin of the American Mathematical Society (N.S.) 30 (1994), no. 2, 161–177. Manuscript dated 26 October 1993; arXiv:math/9404236 [math.HO]. https://arxiv.org/abs/math/9404236.
[13] R. Wilson, Number Theory: A Very Short Introduction, Oxford University Press, Oxford, 2020. doi: 10.1093/actrade/9780198798095.001.0001.