Factorials and Fractions
The equation below calculates any factorial n! and any division into k fractions, making it an optimal way to identify the locations of fractional boundaries or transition points where the various modes of permutations are found in the 12-tone matrix.
Recursive Factorial and Fractional Reductions
The following equations and calculations demonstrate the factorial process and how various factorials can be reduced through recursive fractions (divisions by integers down to 1).
Permutations and Reductions
Whole (1/1)
Permutations: 1! = 1
Reductions: None.
Halves (1/2)
Permutations: 2! = 2
1st fraction starts at 1, ends at 1
2nd fraction starts at 2, ends at 2
Reductions:
Factorials: 2! = 2 / 2 = 1
Fractions: 1/1 / 2 = 1/2 / 1 = 1/2
Thirds (1/3)
Permutations: 3! = 6
1st fraction starts at 1, ends at 2
2nd fraction starts at 3, ends at 4
3rd fraction starts at 5, ends at 6
Reductions:
Factorials: 3! = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 3 = 1/3 / 2 = 1/6 / 1 = 1/6
Fourths (1/4)
Permutations: 4! = 24
1st fraction starts at 1, ends at 6
2nd fraction starts at 7, ends at 12
3rd fraction starts at 13, ends at 18
4th fraction starts at 19, ends at 24
Reductions:
Factorials: 4! = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 4 = 1/4 / 3 = 1/12 / 2 = 1/24 / 1 = 1/24
Fifths (1/5)
Permutations: 5! = 120
1st fraction starts at 1, ends at 24
2nd fraction starts at 25, ends at 48
3rd fraction starts at 49, ends at 72
4th fraction starts at 73, ends at 96
5th fraction starts at 97, ends at 120
Reductions:
Factorials: 5! = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 5 = 1/5 / 4 = 1/20 / 3 = 1/60 / 2 = 1/120 / 1 = 1/120
Sixths (1/6)
Permutations: 6! = 720
1st fraction starts at 1, ends at 120
2nd fraction starts at 121, ends at 240
3rd fraction starts at 241, ends at 360
4th fraction starts at 361, ends at 480
5th fraction starts at 481, ends at 600
6th fraction starts at 601, ends at 720
Reductions:
Factorials: 6! = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 6 = 1/6 / 5 = 1/30 / 4 = 1/120 / 3 = 1/ 360 / 2 = 1/720 / 1 = 1/720
Sevenths (1/7)
Permutations: 7! = 5,040
1st fraction starts at 1, ends at 720
2nd fraction starts at 721, ends at 1,440
3rd fraction starts at 1,441, ends at 2,160
4th fraction starts at 2,161, ends at 2,880
5th fraction starts at 2,881, ends at 3,600
6th fraction starts at 3,601, ends at 4,320
7th fraction starts at 4,321, ends at 5,040
Reductions:
Factorials: 7! = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 7 = 1/7 / 6 = 1/42 / 5 = 1/210 / 4 = 1/840 / 3 = 1/2,520 / 2 = 1/5,040 / 1 = 1/5,040
Eighths (1/8)
Permutations: 8! = 40,320
1st fraction starts at 1, ends at 5,040
2nd fraction starts at 5,041, ends at 10,080
3rd fraction starts at 10,081, ends at 15,120
4th fraction starts at 15,121, ends at 20,160
5th fraction starts at 20,161, ends at 25,200
6th fraction starts at 25,201, ends at 30,240
7th fraction starts at 30,241, ends at 35,280
8th fraction starts at 35,281, ends at 40,320
Reductions:
Factorials: 8! = 40,320 / 8 = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 8 = 1/8 / 7 = 1/56 / 6 = 1/336 / 5 = 1/1,680 / 4 = 1/6,720 / 3 = 1/20,160 / 2 = 1/40,320 / 1 = 1/40,320
Ninths (1/9)
Permutations: 9! = 362,880
1st fraction starts at 1, ends at 40,320
2nd fraction starts at 40,321, ends at 80,640
3rd fraction starts at 80,641, ends at 120,960
4th fraction starts at 120,961, ends at 161,280
5th fraction starts at 161,281, ends at 201,600
6th fraction starts at 201,601, ends at 241,920
7th fraction starts at 241,921, ends at 282,240
8th fraction starts at 282,241, ends at 322,560
9th fraction starts at 322,561, ends at 362,880
Reductions:
Factorials: 9! = 362,880 / 9 = 40,320 / 8 = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 9 = 1/9 / 8 = 1/72 / 7 = 1/504 / 6 = 1/3,024 / 5 = 1/15,120 / 4 = 1/60,480 / 3 = 1/181,440 / 2 = 1/362,880 / 1 = 1/362,880
Tenths (1/10)
Permutations: 10! = 3,628,800
1st fraction starts at 1, ends at 362,880
2nd fraction starts at 362,881, ends at 725,760
3rd fraction starts at 725,761, ends at 1,088,640
4th fraction starts at 1,088,641, ends at 1,451,520
5th fraction starts at 1,451,521, ends at 1,814,400
6th fraction starts at 1,814,401, ends at 2,177,280
7th fraction starts at 2,177,281, ends at 2,540,160
8th fraction starts at 2,540,161, ends at 2,903,040
9th fraction starts at 2,903,041, ends at 3,265,920
10th fraction starts at 3,265,921, ends at 3,628,800
Reductions:
Factorials: 10! = 3,628,800 / 10 = 362,880 / 9 = 40,320 / 8 = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 10 = 1/10 / 9 = 1/90 / 8 = 1/720 / 7 = 1/5,040 / 6 = 1/30,240 / 5 = 1/151,200 / 4 = 1/604,800 / 3 = 1/1,814,400 / 2 = 1/3,628,800 / 1 = 1/3,628,800
Elevenths (1/11)
Permutations: 11! = 39,916,800
1st fraction starts at 1, ends at 3,628,800
2nd fraction starts at 3,628,801, ends at 7,257,600
3rd fraction starts at 7,257,601, ends at 10,886,400
4th fraction starts at 10,886,401, ends at 14,515,200
5th fraction starts at 14,515,201, ends at 18,144,000
6th fraction starts at 18,144,001, ends at 21,772,800
7th fraction starts at 21,772,801, ends at 25,401,600
8th fraction starts at 25,401,601, ends at 29,030,400
9th fraction starts at 29,030,401, ends at 32,659,200
10th fraction starts at 32,659,201, ends at 36,288,000
11th fraction starts at 36,288,001, ends at 39,916,800
Reductions:
Factorials: 11! = 39,916,800 / 11 = 3,628,800 / 10 = 362,880 / 9 = 40,320 / 8 = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 11 = 1/11 / 10 = 1/110 / 9 = 1/990 / 8 = 1/7,920 / 7 = 1/55,440 / 6 = 1/332,640 / 5 = 1 /1,663,200 / 4 = 1/6,652,800 / 3 = 1/19,958,400 / 2 = 1/39,916,800 / 1 = 1/39,916,800
Twelfths (1/12)
Permutations: 12! = 479,001,600
1st fraction starts at 1, ends at 39,916,800
2nd fraction starts at 39,916,801, ends at 79,833,600
3rd fraction starts at 79,833,601, ends at 119,750,400
4th fraction starts at 119,750,401, ends at 159,667,200
5th fraction starts at 159,667,201, ends at 199,584,000
6th fraction starts at 199,584,001, ends at 239,500,800
7th fraction starts at 239,500,801, ends at 279,417,600
8th fraction starts at 279,417,601, ends at 319,334,400
9th fraction starts at 319,334,401, ends at 359,251,200
10th fraction starts at 359,251,201, ends at 399,168,000
11th fraction starts at 399,168,001, ends at 439,084,800
12th fraction starts at 439,084,801, ends at 479,001,600
Reductions:
Factorials: 12! = 479,001,600 / 12 = 39,916,800 / 11 = 3,628,800 / 10 = 362,880 / 9 = 40,320 / 8 = 5,040 / 7 = 720 / 6 = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 12 = 1/12 / 11 = 1/132 / 10 = 1/1,320 / 9 = 1/11,880 / 8 = 1/95,040 / 7 = 1/665,280 / 6 = 1/3,991,680 / 5 = 1/19,958,400 / 4 = 1/79,833,600 / 3 = 1/239,500,800 / 2 = 1/479,001,600 / 1 = 1/479,001,600
EXAMPLE
A picture is worth a thousands words.
The screen-capture below, from the demo, shows how the various colors and numbers form a clear pattern, left to right, that aligns with the fractional reductions detailed above. The fractional reductions are columnar in relation to the permutations, so it’s easy to see and hear.
In this example illustrating a single pentatonic scale combination [0, 2, 4, 7, 9], where all 120 possible permutations (5!) represent the whole (1/1); the first (left-most) column represents 1/5ths (or 5 sets of 24 permutations); the second column represents 1/20ths (or 4 sets of 6 permutations); the third column represents 1/60ths (or 3 sets of 2 permutations); the fourth column represents 1/120ths (1 permutation); and the fifth column also represents 1/120ths (1 permutation).
Factorials and their reductive fractions construct pathways through the forest of permutations. This example shows how we can calculate a unique map that leads directly to any particular permutation or group of permutations.
Permutations: 5! = 5 x 4 x 3 x 2 x 1 = 120
1st fraction starts at 1, ends at 24
2nd fraction starts at 25, ends at 48
3rd fraction starts at 49, ends at 72
4th fraction starts at 73, ends at 96
5th fraction starts at 97, ends at 120
Reductions:
Factorials: 5! = 120 / 5 = 24 / 4 = 6 / 3 = 2 / 1 = 1
Fractions: 1/1 / 5 = 1/5 / 4 = 1/20 / 3 = 1/60 / 2 = 1/120 / 1 = 1/120
1/1 x 1 or 1 complete set of 120 permutations (1 x 120 = 120)
1/1 (5! = 120)
1-120
1/5th x 5 or 5 groups of 24 permutations (5 x 24 = 120)
1/5ths (120 / 5 = 24)
1-24
25-48
49-72
73-96
97-120
1/20th x 20 or 5 sets of 4 groups of 6 permutations (5 x 4 = 20)
1/20ths (24 / 4 = 6)
1-6, 7-12, 13-18, 19-24
25-30, 31-36, 37-42, 43-48
49-54, 55-60, 61-66, 67-72
73-78, 79-84, 85-90, 91-96
97-102, 103-108, 109-114, 115-120
1/60th x 60 or 5 sets of 12 groups of 2 permutations (5 x 12 = 60)
1/60ths (6 / 3 = 2)
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, 31-32, 33-34, 35-36, 37-38, 39-40, 41-42, 43-44, 45-46, 47-48
49-50, 51-52, 53-54, 55-56, 57-58, 59-60, 61-62, 63-64, 65-66, 67-68, 69-70, 71-72
73-74, 75-76, 77-78, 79-80, 81-82, 83-84, 85-86, 87-88, 89-90, 91-92, 93-94, 95-96
97-98, 99-100, 101-102, 103-104, 105-106, 107-108, 109-110, 111-112, 113-114, 115-116, 117-118, 119-120
1/120th x 120 or 5 sets of 24 permutations (5 x 24 = 120)
1/120ths (2 / 2 = 1)
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 … 43, 44, 45, 46, 47, 48
49, 50, 51, 52, 53, 54 … 67, 68, 69, 70, 71, 72
73, 74, 75, 76, 77, 78 … 91, 92, 93, 94, 95, 96
97, 98, 99, 100, 101, 102 … 115, 116, 117, 118, 119, 120
1/120th x 120 or 5 sets of 24 permutations (5 x 24 = 120)
1/120ths (1 / 1 = 1)
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 … 43, 44, 45, 46, 47, 48
49, 50, 51, 52, 53, 54 … 67, 68, 69, 70, 71, 72
73, 74, 75, 76, 77, 78 … 91, 92, 93, 94, 95, 96
97, 98, 99, 100, 101, 102 … 115, 116, 117, 118, 119, 120
Operations (step by step)
This algorithm enables anyone to pinpoint and extract any single permutation or group of permutations from any selected combination by mathematically navigating through the factorial structure. It is not necessary to generate or store the entire permutation list—you can directly calculate any desired permutation or range of permutations using only this math. This makes the process highly efficient for managing extremely large sets of numbers.
Set up
Combination Size: 5
Combination: 0, 7, 2, 9, 4 (cycle order)
First Permutation: 0, 2, 4, 7, 9 (scale order)
Last Permutation: 9, 7, 4, 2, 0 (scale order)
Operation #1 (first permutation)
1 ÷ 5 = 1/5th or 120 / 5 = 24 permutations
Choose from variables 1-5, selected 1 of 5 (permutations 1-24)
1/5 ÷ 4 = 1/20th or 120 ÷ 20 = 6 permutations
Choose from variables 1-4, selected 1 of 4 (permutations 1-6)
1/20 ÷ 3 = 1/60th or 120 ÷ 60 = 2 permutations
Choose from variables 1-3, selected 1 of 3 (permutations 1-2)
1/60 ÷ 2 = 1/120th or 120 ÷ 120 = 1 permutation
Choose from variables 1-2, selected 1 of 2 (permutation 1)
Result: 0, 2, 4, 7, 9 (permutation number 1)
Operation #120 (last permutation)
1 ÷ 5 = 1/5th or 120 / 5 = 24 permutations
Choose from variables 1-5, selected 5 of 5 (permutations 97-120)
1/5 ÷ 4 = 1/20th or 120 ÷ 20 = 6 permutations
Choose from variables 1-4, selected 4 of 4 (permutations 115-120)
1/20 ÷ 3 = 1/60th or 120 ÷ 60 = 2 permutations
Choose from variables 1-3, selected 3 of 3 (permutations 119-120)
1/60 ÷ 2 = 1/120th or 120 ÷ 120 = 1 permutation
Choose from variables 1-2, selected 2 of 2 (permutation 120)
Result: 9, 7, 4, 2, 0 (permutation number 120)
Allowing for all potential variables, any permutation or group of permutations can be calculated and produced using only math.
Harken Music
The Harken Music system makes it possible to calculate all the ≈ 1.2 billion permutations possible in 12-tone music using only math. So instead of creating, maintaining, sorting, and searching a huge database or spreadsheet, we simply calculate the numbers on the fly.
Please read the article “The Future of Music is Math” and the unedited review written entirely by ChatGPT 4o. Then try our open-source HTML/Javascript demo* at harkenmusic.com to see and hear everything for yourself. Using this demo, you can choose any combination size (from 1 to 12 notes) from the pull-down menu; then select any particular combination from the numbered list, to view and hear all permutations, reflections (inversions), and rotations (transpositions).
*Note: a desktop or laptop computer and current web browser are required for using the demo, but there’s no download or sign up required.
Visit harkenmusic.com for more information.