Doubly Recursive Integer Factorizations

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The fundamental theorem of arithmetic states that every integer greater than 1 can be factored uniquely (up to the ordering of the factors) into a product of powers of one or more primes. So denoting the primes 2, 3, 5 … as , , , …, each integer can be factored as , where and are the index and power of the prime in the factorization. For example, , or .


After that, each index and exponent can likewise be factored: . Because the recursive process ends with all indexes and exponents as 1, the ones can be suppressed without loss of meaning, so that .

This Demonstration shows this representation of any integer factorization.


Contributed by: Robert Dickau (September 2018)
Open content licensed under CC BY-NC-SA


Snapshot 1: the integer 2 is the first prime raised to the first power, with representation

Snapshot 2: subscript and superscript are ones displayed

Snapshot 3: hiding the subscript and superscript ones changes the order of factors due to the sorting rules in Mathematica.


[1] "Riffs and Rotes." (Aug 7, 2018)


Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.