Harmonic limit

In just intonation, the p-limit or p-prime-limit consists of ratios of integers whose prime factors are no larger than p.
A positive rational number q belongs to the p-limit for a given prime number p if and only if it can be factored into primes (with positive or negative integer exponents) of size less than or equal to p. In math, such a number is known as a p-smooth number. An interval does not need to contain p as a factor to be considered within the p-limit. For instance, 3/2 is considered part of the 13-limit, since the primes 2 and 3 are smaller than 13. Also, an interval with a p in it is not necessarily within the p-limit. 23/13 is not within the 13-limit, since 23 is a prime number higher than 13.
For any prime number p, the set of all rational numbers in the p-limit defines a finitely generated free abelian group. The rank of this group is equal to π (p), the number of prime numbers less than or equal to p. Hence, for example, the rank of the 7-limit is 4, as it is generated by 2, 3, 5 and 7.