The Gradus Suavitatis or degree of harmoniousness, consonance or pleasantness (Euler, 1739; Smith, 1960; Helmholtz, 1877, 1954) is a function of the prime factors of musical intervals, chords, and scales.
The GS of a prime number or of the ratio of a prime number relative to 1 is the prime number itself, i.e., the GS of 3 or 3/1 is 3.
The GS of a composite number is the sum of the GS's of the prime factors minus 1 less than the number of factors.
The GS of a ratio, chord, or scale may be found by first writing it as an harmonic series and then computing the LCM of the series. The GS of the LCM is the GS of the ratio, chord or scale.
Sets of ratios are converted to harmonic series by multiplying each element by the LCM of the denominators or LCD.
For example, the harmonic series form of the major triad 1/1 5/4 3/2 is 4:5:6. The LCM of this series is 60 and the GS of the major scale is thus 9.