Why is the prime of the Forte number 5-20? See Forte number in Wikipedia.
First of all, let me say that I know very little about music set theory...
I am just curious why a set containing an obvious non-prime (8) is considered prime? Also, is there a formula for calculating those numbers of is it just stochastic brute force? thank you! 
 A: The use of the term "prime form" in music theory is not related to the use of "prime" in mathematics, so it doesn't make sense to evaluate statements about prime forms in music theory using the definition of prime from mathematics.
A: Assuming Wikipedia is correct (and very often it's wrong), the prime form of a chord is "either the normal form of the set or the normal form of its inversion, whichever is more tightly packed."
So, on the piano, it would be the inversion of the chord that you can put the closest together, which you can theoretically play with just one hand (it might not be comfortable, though).
For example, the prime form of a C seventh chord (C, E, G, B-flat) would be its first inversion (E, G, B-flat, C), since the sixth between E and C is a minor sixth, whereas in second and third inversion, the sixth between the lowest and highest notes is a major sixth.
As for the chord $0, 1, 3, 7, 8$, which would be C, D-flat, E-flat, G, A-flat? What an ugly chord. No thanks.
A: Not really. The prime form from (C, E, G, Bb) is (0258).
The algorithm is:
1)Find the normal order of this set
Simple: find the permutation which is most compact (smaller interval from lower to higher note). This results in 1st inversion, (E, G, Bb, C) or [47A0].
2)Find the prime form 
First transpose the normal order so the first note is C, or 0. Here, is a T8 operation, (C, Eb, Gb, Ab) or [0368]. Comparing this set transposed normal order to its inversion normal order (when it exists), the prime form is which has the smaller interval in order.
Inverting our set we find (C, D, F, Ab), or [0258]. This is a simple modular operation, just mod12 each pitch class. (12-0,12-3,12-6,12-8) = {0,9,6,4}, which has normal form [4690]. Applying a T8 to transpose to C, we find [0258]. 
Comparing [0368] and [0258], the second set is our prime form since first interval is smaller (0-2 is a major 2nd while 0-3 is a minor 3rd). So, (0258), or (C, D, F, Ab) is our prime form for this set.
Why doing this? Because pitch class sets relate to others by their internal intervals sonorities, which we label as interval vector. It functions as a fingerprint to sets. To group similar sets (but with different pitch classes), we group by interval vectors and form classes to unify. This is what Forte called “pitch class set classes”. The prime form represents its whole set class, which may have up to 24 different normal orders within (12 Transpositions plus 12 Inversions or Transposed Invertions). Some sets have special features of symmetry which result in fewer normal orders within. But usually, one prime form relates to 24 normal orders.
