In mathematics, the prime signature of a number is the multiset of (nonzero) exponents of its prime factorization. The prime signature of a number having prime factorization p 1 m 1 p 2 m 2 … p n m n {\displaystyle p_{1}^{m_{1}}p_{2}^{m_{2}}\dots p_{n}^{m_{n}}} is the multiset { m 1 , m 2 , … , m n } {\displaystyle \left\{m_{1},m_{2},\dots ,m_{n}\right\}} .
For example, all prime numbers have a prime signature of {1}, the squares of primes have a prime signature of {2}, the products of 2 distinct primes have a prime signature of {1, 1} and the products of a square of a prime and a different prime (e.g. 12, 18, 20, ...) have a prime signature of {2, 1}.